VictoriaMetrics/lib/promscrape/discovery/ovhcloud/ovhcloud_test.go

23 lines
528 B
Go
Raw Normal View History

package ovhcloud
import (
"testing"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/promauth"
)
func Test_GetLabels(t *testing.T) {
t.Run("incorrect service", func(t *testing.T) {
sdc := &SDConfig{
Endpoint: "ovh-ca",
ApplicationKey: "no-op",
ApplicationSecret: &promauth.Secret{S: "no-op"},
ConsumerKey: &promauth.Secret{S: "no-op"},
Service: "incorrect service",
}
if _, err := sdc.GetLabels(""); err == nil {
t.Fatalf("newAPIConfig want err, got: %v", err)
}
})
}