diff --git a/GNUmakefile b/GNUmakefile index 8844e8eda..85ddb724a 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -17,8 +17,12 @@ build: fmtcheck fmtcheck: @sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'" +.PHONY: vet +vet: fmtcheck + go vet $(TEST) + .PHONY: test -test: fmtcheck +test: fmtcheck vet go test $(TEST) -count 1 -timeout=30s -parallel=4 .PHONY: testacc diff --git a/outscale/data_source_outscale_load_balancer_listener_rule.go b/outscale/data_source_outscale_load_balancer_listener_rule.go index 390a7a10c..fae253897 100644 --- a/outscale/data_source_outscale_load_balancer_listener_rule.go +++ b/outscale/data_source_outscale_load_balancer_listener_rule.go @@ -148,14 +148,10 @@ func DataSourceOutscaleLoadBalancerLDRuleRead(d *schema.ResourceData, meta inter if lr.Priority != nil { d.Set("priority", lr.Priority) - } else { - fmt.Errorf("Malformated listener rule") } if lr.VmIds != nil { d.Set("vm_ids", utils.StringSlicePtrToInterfaceSlice(lr.VmIds)) - } else { - fmt.Errorf("Malformated listener rule") } d.SetId(resource.UniqueId()) diff --git a/outscale/data_source_outscale_load_balancer_listener_rules.go b/outscale/data_source_outscale_load_balancer_listener_rules.go index 144c26f3f..7b4c1e671 100644 --- a/outscale/data_source_outscale_load_balancer_listener_rules.go +++ b/outscale/data_source_outscale_load_balancer_listener_rules.go @@ -161,14 +161,10 @@ func DataSourceOutscaleLoadBalancerLDRulesRead(d *schema.ResourceData, meta inte if lr.Priority != nil { l["priority"] = lr.Priority - } else { - fmt.Errorf("Malformated listener rule") } if lr.VmIds != nil { l["vm_ids"] = utils.StringSlicePtrToInterfaceSlice(lr.VmIds) - } else { - fmt.Errorf("Malformated listener rule") } lrs_ret[k] = l } diff --git a/outscale/resource_outscale_load_balancer_vms.go b/outscale/resource_outscale_load_balancer_vms.go index 495a44877..919623fbd 100644 --- a/outscale/resource_outscale_load_balancer_vms.go +++ b/outscale/resource_outscale_load_balancer_vms.go @@ -90,7 +90,7 @@ func ResourceLBUAttachmentRead(d *schema.ResourceData, meta interface{}) error { if managed.Len() == 0 { log.Printf("[WARN] not expected attachments found in LBU %s", lbuName) - log.Printf("[WARN] lbu current attachments are %#v", all_backends) + log.Printf("[WARN] lbu current attachments are %#v", &all_backends) log.Printf("[WARN] we would manage only these attachments %#v", expected) log.Printf("[WARN] no managed attachments are present.") d.SetId("")