Update go version
This commit is contained in:
parent
74ace58ae1
commit
48e7a87741
18 changed files with 90 additions and 83 deletions
|
@ -386,7 +386,7 @@ func (p *Provider) lookupEc2Instances(ctx context.Context, client *awsClient, cl
|
|||
})
|
||||
|
||||
if err != nil {
|
||||
log.Errorf("Unable to describe instances [%s]: %v", err)
|
||||
log.Errorf("Unable to describe instances: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
|
|
@ -517,37 +517,37 @@ func TestModifierType(t *testing.T) {
|
|||
expectedModifierRule string
|
||||
}{
|
||||
{
|
||||
desc: "Request modifier annotation missing",
|
||||
desc: "Request modifier annotation missing",
|
||||
requestModifierAnnotation: "",
|
||||
expectedModifierRule: "",
|
||||
},
|
||||
{
|
||||
desc: "AddPrefix modifier annotation",
|
||||
desc: "AddPrefix modifier annotation",
|
||||
requestModifierAnnotation: " AddPrefix: /foo",
|
||||
expectedModifierRule: "AddPrefix:/foo",
|
||||
},
|
||||
{
|
||||
desc: "ReplacePath modifier annotation",
|
||||
desc: "ReplacePath modifier annotation",
|
||||
requestModifierAnnotation: " ReplacePath: /foo",
|
||||
expectedModifierRule: "ReplacePath:/foo",
|
||||
},
|
||||
{
|
||||
desc: "ReplacePathRegex modifier annotation",
|
||||
desc: "ReplacePathRegex modifier annotation",
|
||||
requestModifierAnnotation: " ReplacePathRegex: /foo /bar",
|
||||
expectedModifierRule: "ReplacePathRegex:/foo /bar",
|
||||
},
|
||||
{
|
||||
desc: "AddPrefix modifier annotation",
|
||||
desc: "AddPrefix modifier annotation",
|
||||
requestModifierAnnotation: "AddPrefix:/foo",
|
||||
expectedModifierRule: "AddPrefix:/foo",
|
||||
},
|
||||
{
|
||||
desc: "ReplacePath modifier annotation",
|
||||
desc: "ReplacePath modifier annotation",
|
||||
requestModifierAnnotation: "ReplacePath:/foo",
|
||||
expectedModifierRule: "ReplacePath:/foo",
|
||||
},
|
||||
{
|
||||
desc: "ReplacePathRegex modifier annotation",
|
||||
desc: "ReplacePathRegex modifier annotation",
|
||||
requestModifierAnnotation: "ReplacePathRegex:/foo /bar",
|
||||
expectedModifierRule: "ReplacePathRegex:/foo /bar",
|
||||
},
|
||||
|
@ -609,23 +609,23 @@ func TestModifierFails(t *testing.T) {
|
|||
requestModifierAnnotation string
|
||||
}{
|
||||
{
|
||||
desc: "Request modifier missing part of annotation",
|
||||
desc: "Request modifier missing part of annotation",
|
||||
requestModifierAnnotation: "AddPrefix: ",
|
||||
},
|
||||
{
|
||||
desc: "Request modifier full of spaces annotation",
|
||||
desc: "Request modifier full of spaces annotation",
|
||||
requestModifierAnnotation: " ",
|
||||
},
|
||||
{
|
||||
desc: "Request modifier missing both parts of annotation",
|
||||
desc: "Request modifier missing both parts of annotation",
|
||||
requestModifierAnnotation: " : ",
|
||||
},
|
||||
{
|
||||
desc: "Request modifier using unknown rule",
|
||||
desc: "Request modifier using unknown rule",
|
||||
requestModifierAnnotation: "Foo: /bar",
|
||||
},
|
||||
{
|
||||
desc: "Missing Rule",
|
||||
desc: "Missing Rule",
|
||||
requestModifierAnnotation: " : /bar",
|
||||
},
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ func (p *Provider) Provide(configurationChan chan<- types.ConfigMessage, pool *s
|
|||
func detectMasters(zk string, masters []string) <-chan []string {
|
||||
changed := make(chan []string, 1)
|
||||
if zk != "" {
|
||||
log.Debugf("Starting master detector for ZK ", zk)
|
||||
log.Debugf("Starting master detector for ZK %s", zk)
|
||||
if md, err := detector.New(zk); err != nil {
|
||||
log.Errorf("Failed to create master detector: %v", err)
|
||||
} else if err := md.Detect(detect.NewMasters(masters, changed)); err != nil {
|
||||
|
|
|
@ -743,7 +743,7 @@ func TestProviderBuildConfiguration(t *testing.T) {
|
|||
|
||||
func TestProviderServiceFilter(t *testing.T) {
|
||||
provider := &Provider{
|
||||
Domain: "rancher.localhost",
|
||||
Domain: "rancher.localhost",
|
||||
EnableServiceHealthFilter: true,
|
||||
}
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ func TestProviderBuildConfigurationV1(t *testing.T) {
|
|||
|
||||
func TestProviderServiceFilterV1(t *testing.T) {
|
||||
provider := &Provider{
|
||||
Domain: "rancher.localhost",
|
||||
Domain: "rancher.localhost",
|
||||
EnableServiceHealthFilter: true,
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ func (p *Provider) metadataProvide(configurationChan chan<- types.ConfigMessage,
|
|||
operation := func() error {
|
||||
client, err := rancher.NewClientAndWait(metadataServiceURL)
|
||||
if err != nil {
|
||||
log.Errorln("Failed to create Rancher metadata service client: %s", err)
|
||||
log.Errorf("Failed to create Rancher metadata service client: %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ func (p *Provider) metadataProvide(configurationChan chan<- types.ConfigMessage,
|
|||
|
||||
stacks, err := client.GetStacks()
|
||||
if err != nil {
|
||||
log.Errorf("Failed to query Rancher metadata service: %s", err)
|
||||
log.Errorf("Failed to query Rancher metadata service: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue