From 28c221e189193727f575fa611b065ceed99cd9c3 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Thu, 14 Nov 2024 14:12:21 -0500 Subject: [PATCH] use t.Fatal --- ziti/cmd/pki/pki_create_ca_test.go | 9 ++++----- ziti/cmd/pki/pki_create_client_test.go | 9 ++++----- ziti/cmd/pki/pki_create_intermediate_test.go | 3 +-- ziti/cmd/pki/pki_create_server_test.go | 9 ++++----- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/ziti/cmd/pki/pki_create_ca_test.go b/ziti/cmd/pki/pki_create_ca_test.go index d6b25fbc3..01cfb4667 100644 --- a/ziti/cmd/pki/pki_create_ca_test.go +++ b/ziti/cmd/pki/pki_create_ca_test.go @@ -18,7 +18,6 @@ package pki import ( "fmt" "github.com/google/uuid" - "github.com/sirupsen/logrus" "testing" "github.com/stretchr/testify/assert" @@ -38,7 +37,7 @@ func TestTrustDomain(t *testing.T) { ca.SetArgs(rootCaArgs) pkiErr := ca.Execute() if pkiErr != nil { - logrus.Fatal(pkiErr) + t.Fatal(pkiErr) } bundle, e := testPki.GetCA(name) @@ -61,7 +60,7 @@ func TestNoTrustDomain(t *testing.T) { ca.SetArgs(rootCaArgs) pkiErr := ca.Execute() if pkiErr != nil { - logrus.Fatal(pkiErr) + t.Fatal(pkiErr) } bundle, e := testPki.GetCA(name) @@ -85,7 +84,7 @@ func TestTrustDomainSpiffeAppended(t *testing.T) { ca.SetArgs(rootCaArgs) pkiErr := ca.Execute() if pkiErr != nil { - logrus.Fatal(pkiErr) + t.Fatal(pkiErr) } bundle, e := testPki.GetCA(name) @@ -109,7 +108,7 @@ func TestTrustDomainWithPath(t *testing.T) { ca.SetArgs(rootCaArgs) pkiErr := ca.Execute() if pkiErr != nil { - logrus.Fatal(pkiErr) + t.Fatal(pkiErr) } bundle, e := testPki.GetCA(name) diff --git a/ziti/cmd/pki/pki_create_client_test.go b/ziti/cmd/pki/pki_create_client_test.go index e36ef6e28..6e73f02da 100644 --- a/ziti/cmd/pki/pki_create_client_test.go +++ b/ziti/cmd/pki/pki_create_client_test.go @@ -18,7 +18,6 @@ package pki import ( "fmt" "github.com/google/uuid" - "github.com/sirupsen/logrus" "testing" "github.com/stretchr/testify/assert" @@ -38,7 +37,7 @@ func TestClientCertNoSpiffeIdFromIntermediate(t *testing.T) { svr.SetArgs(args) svrErr := svr.Execute() if svrErr != nil { - logrus.Fatal(svrErr) + t.Fatal(svrErr) } bundle, e := testPki.GetBundle(intCaNameWithoutSpiffeIdName, name) @@ -62,7 +61,7 @@ func TestClientCertSpiffeIdFromIntermediate(t *testing.T) { svr.SetArgs(addSpiffeArg("/some/path", args)) svrErr := svr.Execute() if svrErr != nil { - logrus.Fatal(svrErr) + t.Fatal(svrErr) } bundle, e := testPki.GetBundle(intCaNameWithSpiffeIdName, name) @@ -88,7 +87,7 @@ func TestClientCertNoSpiffeIdFromIntermediateAddSpiffeId(t *testing.T) { svr.SetArgs(addSpiffeArg(sid, args)) svrErr := svr.Execute() if svrErr != nil { - logrus.Fatal(svrErr) + t.Fatal(svrErr) } bundle, e := testPki.GetBundle(intCaNameWithoutSpiffeIdName, name) @@ -113,7 +112,7 @@ func TestClientCertSpiffeIdFromIntermediateAddSpiffeId(t *testing.T) { svr.SetArgs(addSpiffeArg(sid, args)) svrErr := svr.Execute() if svrErr != nil { - logrus.Fatal(svrErr) + t.Fatal(svrErr) } bundle, e := testPki.GetBundle(intCaNameWithSpiffeIdName, name) diff --git a/ziti/cmd/pki/pki_create_intermediate_test.go b/ziti/cmd/pki/pki_create_intermediate_test.go index 87e97aea7..a20a106fd 100644 --- a/ziti/cmd/pki/pki_create_intermediate_test.go +++ b/ziti/cmd/pki/pki_create_intermediate_test.go @@ -18,7 +18,6 @@ package pki import ( "fmt" "github.com/google/uuid" - "github.com/sirupsen/logrus" "testing" "github.com/stretchr/testify/assert" @@ -39,7 +38,7 @@ func TestSpiffedSetFromCa(t *testing.T) { intermediateCmd.SetArgs(intermediateArgs) pkiErr := intermediateCmd.Execute() if pkiErr != nil { - logrus.Fatal(pkiErr) + t.Fatal(pkiErr) } bundle, e := testPki.GetCA(name) diff --git a/ziti/cmd/pki/pki_create_server_test.go b/ziti/cmd/pki/pki_create_server_test.go index 2ed430921..4793b534b 100644 --- a/ziti/cmd/pki/pki_create_server_test.go +++ b/ziti/cmd/pki/pki_create_server_test.go @@ -18,7 +18,6 @@ package pki import ( "fmt" "github.com/google/uuid" - "github.com/sirupsen/logrus" "testing" "github.com/stretchr/testify/assert" @@ -40,7 +39,7 @@ func TestServerCertNoSpiffeIdFromIntermediate(t *testing.T) { svr.SetArgs(args) svrErr := svr.Execute() if svrErr != nil { - logrus.Fatal(svrErr) + t.Fatal(svrErr) } bundle, e := testPki.GetBundle(intCaNameWithoutSpiffeIdName, name) @@ -71,7 +70,7 @@ func TestServerCertSpiffeIdFromIntermediate(t *testing.T) { svr.SetArgs(addSpiffeArg("/some/path", args)) svrErr := svr.Execute() if svrErr != nil { - logrus.Fatal(svrErr) + t.Fatal(svrErr) } bundle, e := testPki.GetBundle(intCaNameWithSpiffeIdName, name) @@ -105,7 +104,7 @@ func TestServerCertNoSpiffeIdFromIntermediateAddSpiffeId(t *testing.T) { svr.SetArgs(addSpiffeArg(sid, args)) svrErr := svr.Execute() if svrErr != nil { - logrus.Fatal(svrErr) + t.Fatal(svrErr) } bundle, e := testPki.GetBundle(intCaNameWithoutSpiffeIdName, name) @@ -132,7 +131,7 @@ func TestServerCertSpiffeIdFromIntermediateAddSpiffeId(t *testing.T) { svr.SetArgs(addSpiffeArg(sid, args)) svrErr := svr.Execute() if svrErr != nil { - logrus.Fatal(svrErr) + t.Fatal(svrErr) } bundle, e := testPki.GetBundle(intCaNameWithSpiffeIdName, name)