diff --git a/cmd/testworkflow-toolkit/artifacts/handler_test.go b/cmd/testworkflow-toolkit/artifacts/handler_test.go index 79b73a93f2..b5ca18acd4 100644 --- a/cmd/testworkflow-toolkit/artifacts/handler_test.go +++ b/cmd/testworkflow-toolkit/artifacts/handler_test.go @@ -4,6 +4,7 @@ import ( "encoding/json" "net/http" "net/http/httptest" + "os" "testing" "github.com/golang/mock/gomock" @@ -17,6 +18,9 @@ import ( ) func TestHandler_CloudUploader(t *testing.T) { + // Populate empty internal configuration, as it is required for the Toolkit + _ = os.Setenv("TK_CFG", "{}") + mockCtrl := gomock.NewController(t) defer mockCtrl.Finish() diff --git a/cmd/testworkflow-toolkit/commands/artifacts_test.go b/cmd/testworkflow-toolkit/commands/artifacts_test.go index 83469d1648..5d1863c4cc 100644 --- a/cmd/testworkflow-toolkit/commands/artifacts_test.go +++ b/cmd/testworkflow-toolkit/commands/artifacts_test.go @@ -6,6 +6,7 @@ import ( "io/fs" "net/http" "net/http/httptest" + "os" "testing" "github.com/kubeshop/testkube/pkg/cloud/data/testworkflow" @@ -27,6 +28,9 @@ var testDataFixtures embed.FS func TestRun_Integration(t *testing.T) { test.IntegrationTest(t) + // Populate empty internal configuration, as it is required for the Toolkit + _ = os.Setenv("TK_CFG", "{}") + mockCtrl := gomock.NewController(t) defer mockCtrl.Finish()