Skip to content

Commit 1c49802

Browse files
committed
fix(cli): add explicit return after t.Fatal to satisfy staticcheck SA5011
1 parent dab7722 commit 1c49802

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

cmd/sluice/cert_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ func TestCertGenerate(t *testing.T) {
5050
certBlock, _ := pem.Decode(certData)
5151
if certBlock == nil {
5252
t.Fatal("ca-cert.pem is not valid PEM")
53+
return
5354
}
5455
if certBlock.Type != "CERTIFICATE" {
5556
t.Errorf("unexpected PEM type: %s", certBlock.Type)
@@ -58,6 +59,7 @@ func TestCertGenerate(t *testing.T) {
5859
keyBlock, _ := pem.Decode(keyData)
5960
if keyBlock == nil {
6061
t.Fatal("ca-key.pem is not valid PEM")
62+
return
6163
}
6264
if keyBlock.Type != "EC PRIVATE KEY" {
6365
t.Errorf("unexpected key PEM type: %s", keyBlock.Type)

cmd/sluice/cred_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,7 @@ func TestHandleCredAddOAuth(t *testing.T) {
913913
}
914914
if meta == nil {
915915
t.Fatal("expected credential_meta row")
916+
return
916917
}
917918
if meta.CredType != "oauth" {
918919
t.Errorf("meta cred_type = %q, want %q", meta.CredType, "oauth")
@@ -1185,6 +1186,7 @@ func TestHandleCredAddOAuthCreationFlow(t *testing.T) {
11851186
}
11861187
if meta == nil {
11871188
t.Fatal("expected credential_meta row")
1189+
return
11881190
}
11891191
if meta.CredType != "oauth" {
11901192
t.Errorf("meta cred_type = %q, want oauth", meta.CredType)

0 commit comments

Comments
 (0)