From dc3903ff15595b5a08f5478d4a73bdeae3db6c6c Mon Sep 17 00:00:00 2001 From: Daniel Hougaard Date: Fri, 29 Nov 2024 23:02:18 +0400 Subject: [PATCH] fix(cli): disabled test --- cli/test/secrets_test.go | 43 ++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/cli/test/secrets_test.go b/cli/test/secrets_test.go index 2a92c6209..f7f0f13ff 100644 --- a/cli/test/secrets_test.go +++ b/cli/test/secrets_test.go @@ -3,7 +3,6 @@ package tests import ( "testing" - "github.com/Infisical/infisical-merge/packages/util" "github.com/bradleyjkemp/cupaloy/v2" ) @@ -97,28 +96,28 @@ func TestUserAuth_SecretsGetAll(t *testing.T) { } // disabled for the time being -func testUserAuth_SecretsGetAllWithoutConnection(t *testing.T) { - originalConfigFile, err := util.GetConfigFile() - if err != nil { - t.Fatalf("error getting config file") - } - newConfigFile := originalConfigFile +// func testUserAuth_SecretsGetAllWithoutConnection(t *testing.T) { +// originalConfigFile, err := util.GetConfigFile() +// if err != nil { +// t.Fatalf("error getting config file") +// } +// newConfigFile := originalConfigFile - // set it to a URL that will always be unreachable - newConfigFile.LoggedInUserDomain = "http://localhost:4999" - util.WriteConfigFile(&newConfigFile) +// // set it to a URL that will always be unreachable +// newConfigFile.LoggedInUserDomain = "http://localhost:4999" +// util.WriteConfigFile(&newConfigFile) - // restore config file - defer util.WriteConfigFile(&originalConfigFile) +// // restore config file +// defer util.WriteConfigFile(&originalConfigFile) - output, err := ExecuteCliCommand(FORMATTED_CLI_NAME, "secrets", "--projectId", creds.ProjectID, "--env", creds.EnvSlug, "--include-imports=false", "--silent") - if err != nil { - t.Fatalf("error running CLI command: %v", err) - } +// output, err := ExecuteCliCommand(FORMATTED_CLI_NAME, "secrets", "--projectId", creds.ProjectID, "--env", creds.EnvSlug, "--include-imports=false", "--silent") +// if err != nil { +// t.Fatalf("error running CLI command: %v", err) +// } - // Use cupaloy to snapshot test the output - err = cupaloy.Snapshot(output) - if err != nil { - t.Fatalf("snapshot failed: %v", err) - } -} +// // Use cupaloy to snapshot test the output +// err = cupaloy.Snapshot(output) +// if err != nil { +// t.Fatalf("snapshot failed: %v", err) +// } +// }