fix(cli): disabled test

This commit is contained in:
Daniel Hougaard
2024-11-29 23:02:18 +04:00
parent 586b9d9a56
commit dc3903ff15
+21 -22
View File
@@ -3,7 +3,6 @@ package tests
import ( import (
"testing" "testing"
"github.com/Infisical/infisical-merge/packages/util"
"github.com/bradleyjkemp/cupaloy/v2" "github.com/bradleyjkemp/cupaloy/v2"
) )
@@ -97,28 +96,28 @@ func TestUserAuth_SecretsGetAll(t *testing.T) {
} }
// disabled for the time being // disabled for the time being
func testUserAuth_SecretsGetAllWithoutConnection(t *testing.T) { // func testUserAuth_SecretsGetAllWithoutConnection(t *testing.T) {
originalConfigFile, err := util.GetConfigFile() // originalConfigFile, err := util.GetConfigFile()
if err != nil { // if err != nil {
t.Fatalf("error getting config file") // t.Fatalf("error getting config file")
} // }
newConfigFile := originalConfigFile // newConfigFile := originalConfigFile
// set it to a URL that will always be unreachable // // set it to a URL that will always be unreachable
newConfigFile.LoggedInUserDomain = "http://localhost:4999" // newConfigFile.LoggedInUserDomain = "http://localhost:4999"
util.WriteConfigFile(&newConfigFile) // util.WriteConfigFile(&newConfigFile)
// restore config file // // restore config file
defer util.WriteConfigFile(&originalConfigFile) // defer util.WriteConfigFile(&originalConfigFile)
output, err := ExecuteCliCommand(FORMATTED_CLI_NAME, "secrets", "--projectId", creds.ProjectID, "--env", creds.EnvSlug, "--include-imports=false", "--silent") // output, err := ExecuteCliCommand(FORMATTED_CLI_NAME, "secrets", "--projectId", creds.ProjectID, "--env", creds.EnvSlug, "--include-imports=false", "--silent")
if err != nil { // if err != nil {
t.Fatalf("error running CLI command: %v", err) // t.Fatalf("error running CLI command: %v", err)
} // }
// Use cupaloy to snapshot test the output // // Use cupaloy to snapshot test the output
err = cupaloy.Snapshot(output) // err = cupaloy.Snapshot(output)
if err != nil { // if err != nil {
t.Fatalf("snapshot failed: %v", err) // t.Fatalf("snapshot failed: %v", err)
} // }
} // }