treewide: add nolint after t.Skip/log.Fatal to make staticcheck happy
Change-Id: I8b3dcff93fcb1d11673f327252693e6aba26c239
Reviewed-on: https://review.monogon.dev/c/monogon/+/3020
Tested-by: Jenkins CI
Reviewed-by: Serge Bazanski <serge@monogon.tech>
Vouch-Run-CI: Tim Windelschmidt <tim@monogon.tech>
diff --git a/cloud/equinix/wrapngo/wrapngo_live_test.go b/cloud/equinix/wrapngo/wrapngo_live_test.go
index fb649c1..166da4b 100644
--- a/cloud/equinix/wrapngo/wrapngo_live_test.go
+++ b/cloud/equinix/wrapngo/wrapngo_live_test.go
@@ -259,6 +259,7 @@
t.Skip("could not find a provisionable hardware reservation - skipping...")
}
+ // nolint:SA5011
d, err := cl.CreateDevice(ctx, &packngo.DeviceCreateRequest{
Hostname: ltc.testDeviceHostname,
OS: ltc.apios,
@@ -283,9 +284,11 @@
}
if d == nil {
t.Fatalf("expected the test device (ID: %s) to exist.", testDevice.ID)
+ return
}
if d.ID != testDevice.ID {
t.Errorf("got device ID that doesn't match the original.")
+ return
}
})
t.Run("ListDevices", func(t *testing.T) {
diff --git a/metropolis/cli/metroctl/cmd_node_approve.go b/metropolis/cli/metroctl/cmd_node_approve.go
index b26ea2f..41c6f24 100644
--- a/metropolis/cli/metroctl/cmd_node_approve.go
+++ b/metropolis/cli/metroctl/cmd_node_approve.go
@@ -63,6 +63,7 @@
if n == nil {
log.Fatalf("Couldn't find a new node matching id %s", tgtNodeId)
}
+ // nolint:SA5011
_, err := mgmt.ApproveNode(ctx, &api.ApproveNodeRequest{
Pubkey: n.Pubkey,
})