Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vet code checking #440

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions outscale/data_source_outscale_load_balancer_listener_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
4 changes: 0 additions & 4 deletions outscale/data_source_outscale_load_balancer_listener_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion outscale/resource_outscale_load_balancer_vms.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
outscale-toa marked this conversation as resolved.
Show resolved Hide resolved
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("")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"description": "TF-109",
"filter": "########",
"id": "##id-1##",
"is_source_dest_checked": false,
"is_source_dest_checked": true,
"link_nic": [],
"link_public_ip": [],
"mac_address": "########",
Expand Down Expand Up @@ -80,7 +80,7 @@
"description": "TF-109",
"filter": "########",
"id": "##id-1##",
"is_source_dest_checked": false,
"is_source_dest_checked": true,
"link_nic": [],
"link_public_ip": [],
"mac_address": "########",
Expand Down Expand Up @@ -198,7 +198,7 @@
"description": "",
"filter": "########",
"id": "##id-9##",
"is_source_dest_checked": false,
"is_source_dest_checked": true,
"link_nic": [],
"link_public_ip": [],
"mac_address": "########",
Expand Down Expand Up @@ -256,7 +256,7 @@
"description": "TF-109",
"filter": "########",
"id": "##id-1##",
"is_source_dest_checked": false,
"is_source_dest_checked": true,
"link_nic": [],
"link_public_ip": [],
"mac_address": "########",
Expand Down Expand Up @@ -318,7 +318,7 @@
"description": "",
"filter": "########",
"id": "##id-10##",
"is_source_dest_checked": false,
"is_source_dest_checked": true,
"link_nic": [],
"link_public_ip": [],
"mac_address": "########",
Expand Down Expand Up @@ -396,7 +396,7 @@
"account_id": "##id-0##",
"description": "TF-109",
"id": "##id-1##",
"is_source_dest_checked": false,
"is_source_dest_checked": true,
"link_nic": [],
"link_public_ip": [],
"mac_address": "########",
Expand Down Expand Up @@ -466,7 +466,7 @@
"account_id": "##id-0##",
"description": "",
"id": "##id-9##",
"is_source_dest_checked": false,
"is_source_dest_checked": true,
"link_nic": [],
"link_public_ip": [],
"mac_address": "########",
Expand Down Expand Up @@ -532,7 +532,7 @@
"account_id": "##id-0##",
"description": "",
"id": "##id-10##",
"is_source_dest_checked": false,
"is_source_dest_checked": true,
"link_nic": [],
"link_public_ip": [],
"mac_address": "########",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"account_id": "##id-2##",
"description": "",
"id": "##id-3##",
"is_source_dest_checked": false,
"is_source_dest_checked": true,
"link_nic": [],
"link_public_ip": [],
"mac_address": "########",
Expand Down Expand Up @@ -94,7 +94,7 @@
"account_id": "##id-2##",
"description": "",
"id": "##id-6##",
"is_source_dest_checked": false,
"is_source_dest_checked": true,
"link_nic": [],
"link_public_ip": [],
"mac_address": "########",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"account_id": "##id-2##",
"description": "",
"id": "##id-3##",
"is_source_dest_checked": false,
"is_source_dest_checked": true,
"link_nic": [],
"link_public_ip": [],
"mac_address": "########",
Expand Down Expand Up @@ -95,7 +95,7 @@
"account_id": "##id-2##",
"description": "",
"id": "##id-6##",
"is_source_dest_checked": false,
"is_source_dest_checked": true,
"link_nic": [],
"link_public_ip": [],
"mac_address": "########",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"account_id": "##id-3##",
"description": "",
"id": "##id-4##",
"is_source_dest_checked": false,
"is_source_dest_checked": true,
"link_nic": [],
"link_public_ip": [],
"mac_address": "########",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"account_id": "##id-2##",
"description": "",
"id": "##id-3##",
"is_source_dest_checked": false,
"is_source_dest_checked": true,
"link_nic": [],
"link_public_ip": [],
"mac_address": "########",
Expand Down
Loading
Loading