Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

small nits

Maidul Islamde21b444864a
diff --git a/cli/test/export_test.go b/cli/test/export_test.go
index d3069701bc..9a936871dc 100644
--- a/cli/test/export_test.go
+++ b/cli/test/export_test.go
@@ -1,7 +1,6 @@
package tests
import (
- "fmt"
"testing"
"github.com/bradleyjkemp/cupaloy/v2"
@@ -13,8 +12,6 @@ func TestUniversalAuth_ExportSecretsWithImports(t *testing.T) {
output, err := ExecuteCliCommand(FORMATTED_CLI_NAME, "export", "--token", creds.UAAccessToken, "--projectId", creds.ProjectID, "--env", creds.EnvSlug, "--silent")
- fmt.Printf("output: %v\n", output)
-
if err != nil {
t.Fatalf("error running CLI command: %v", err)
}
@@ -31,8 +28,6 @@ func TestServiceToken_ExportSecretsWithImports(t *testing.T) {
output, err := ExecuteCliCommand(FORMATTED_CLI_NAME, "export", "--token", creds.ServiceToken, "--projectId", creds.ProjectID, "--env", creds.EnvSlug, "--silent")
- fmt.Printf("output: %v\n", output)
-
if err != nil {
t.Fatalf("error running CLI command: %v", err)
}
@@ -50,8 +45,6 @@ func TestUniversalAuth_ExportSecretsWithoutImports(t *testing.T) {
output, err := ExecuteCliCommand(FORMATTED_CLI_NAME, "export", "--token", creds.UAAccessToken, "--projectId", creds.ProjectID, "--env", creds.EnvSlug, "--silent", "--include-imports=false")
- fmt.Printf("output: %v\n", output)
-
if err != nil {
t.Fatalf("error running CLI command: %v", err)
}
@@ -68,8 +61,6 @@ func TestServiceToken_ExportSecretsWithoutImports(t *testing.T) {
output, err := ExecuteCliCommand(FORMATTED_CLI_NAME, "export", "--token", creds.ServiceToken, "--projectId", creds.ProjectID, "--env", creds.EnvSlug, "--silent", "--include-imports=false")
- fmt.Printf("output: %v\n", output)
-
if err != nil {
t.Fatalf("error running CLI command: %v", err)
}
diff --git a/cli/test/run_test.go b/cli/test/run_test.go
index 76dde0c723..808f4f14ff 100644
--- a/cli/test/run_test.go
+++ b/cli/test/run_test.go
@@ -2,7 +2,6 @@ package tests
import (
"bytes"
- "fmt"
"testing"
"github.com/bradleyjkemp/cupaloy/v2"
@@ -18,7 +17,6 @@ func TestServiceToken_RunCmdRecursiveAndImports(t *testing.T) {
}
output = string(bytes.Split([]byte(output), []byte("INF"))[1])
- fmt.Printf("output: %v\n", output)
// Use cupaloy to snapshot test the output
err = cupaloy.Snapshot(output)
@@ -36,7 +34,6 @@ func TestServiceToken_RunCmdWithImports(t *testing.T) {
}
output = string(bytes.Split([]byte(output), []byte("INF"))[1])
- fmt.Printf("output: %v\n", output)
// Use cupaloy to snapshot test the output
err = cupaloy.Snapshot(output)
@@ -56,7 +53,6 @@ func TestUniversalAuth_RunCmdRecursiveAndImports(t *testing.T) {
}
output = string(bytes.Split([]byte(output), []byte("INF"))[1])
- fmt.Printf("output: %v\n", output)
// Use cupaloy to snapshot test the output
err = cupaloy.Snapshot(output)
@@ -77,7 +73,6 @@ func TestUniversalAuth_RunCmdWithImports(t *testing.T) {
// remove the first few characters from the output because we don't care about the time, and it will change every time
output = string(bytes.Split([]byte(output), []byte("INF"))[1])
- fmt.Printf("output: %v\n", output)
// Use cupaloy to snapshot test the output
err = cupaloy.Snapshot(output)
@@ -97,7 +92,6 @@ func TestUniversalAuth_RunCmdWithoutImports(t *testing.T) {
}
output = string(bytes.Split([]byte(output), []byte("INF"))[1])
- fmt.Printf("output: %v\n", output)
// Use cupaloy to snapshot test the output
err = cupaloy.Snapshot(output)
@@ -117,7 +111,6 @@ func TestServiceToken_RunCmdWithoutImports(t *testing.T) {
// Remove everything before "INF" because it's not relevant to the test
output = string(bytes.Split([]byte(output), []byte("INF"))[1])
- fmt.Printf("output: %v\n", output)
// Use cupaloy to snapshot test the output
err = cupaloy.Snapshot(output)
diff --git a/cli/test/secrets_by_name_test.go b/cli/test/secrets_by_name_test.go
index bd86749b65..440324e1ac 100644
--- a/cli/test/secrets_by_name_test.go
+++ b/cli/test/secrets_by_name_test.go
@@ -1,7 +1,6 @@
package tests
import (
- "fmt"
"testing"
"github.com/bradleyjkemp/cupaloy/v2"
@@ -12,8 +11,6 @@ func TestServiceToken_GetSecretsByNameRecursive(t *testing.T) {
output, err := ExecuteCliCommand(FORMATTED_CLI_NAME, "secrets", "get", "TEST-SECRET-1", "TEST-SECRET-2", "FOLDER-SECRET-1", "--token", creds.ServiceToken, "--projectId", creds.ProjectID, "--env", creds.EnvSlug, "--recursive", "--silent")
- fmt.Printf("output: %v\n", output)
-
if err != nil {
t.Fatalf("error running CLI command: %v", err)
}
@@ -30,8 +27,6 @@ func TestServiceToken_GetSecretsByNameWithNotFoundSecret(t *testing.T) {
output, err := ExecuteCliCommand(FORMATTED_CLI_NAME, "secrets", "get", "TEST-SECRET-1", "TEST-SECRET-2", "FOLDER-SECRET-1", "DOES-NOT-EXIST", "--token", creds.ServiceToken, "--projectId", creds.ProjectID, "--env", creds.EnvSlug, "--recursive", "--silent")
- fmt.Printf("output: %v\n", output)
-
if err != nil {
t.Fatalf("error running CLI command: %v", err)
}
@@ -48,8 +43,6 @@ func TestServiceToken_GetSecretsByNameWithImports(t *testing.T) {
output, err := ExecuteCliCommand(FORMATTED_CLI_NAME, "secrets", "get", "TEST-SECRET-1", "STAGING-SECRET-2", "FOLDER-SECRET-1", "--token", creds.ServiceToken, "--projectId", creds.ProjectID, "--env", creds.EnvSlug, "--recursive", "--silent")
- fmt.Printf("output: %v\n", output)
-
if err != nil {
t.Fatalf("error running CLI command: %v", err)
}
@@ -67,8 +60,6 @@ func TestUniversalAuth_GetSecretsByNameRecursive(t *testing.T) {
output, err := ExecuteCliCommand(FORMATTED_CLI_NAME, "secrets", "get", "TEST-SECRET-1", "TEST-SECRET-2", "FOLDER-SECRET-1", "--token", creds.UAAccessToken, "--projectId", creds.ProjectID, "--env", creds.EnvSlug, "--recursive", "--silent")
- fmt.Printf("output: %v\n", output)
-
if err != nil {
t.Fatalf("error running CLI command: %v", err)
}
@@ -86,8 +77,6 @@ func TestUniversalAuth_GetSecretsByNameWithNotFoundSecret(t *testing.T) {
output, err := ExecuteCliCommand(FORMATTED_CLI_NAME, "secrets", "get", "TEST-SECRET-1", "TEST-SECRET-2", "FOLDER-SECRET-1", "DOES-NOT-EXIST", "--token", creds.UAAccessToken, "--projectId", creds.ProjectID, "--env", creds.EnvSlug, "--recursive", "--silent")
- fmt.Printf("output: %v\n", output)
-
if err != nil {
t.Fatalf("error running CLI command: %v", err)
}
@@ -105,8 +94,6 @@ func TestUniversalAuth_GetSecretsByNameWithImports(t *testing.T) {
output, err := ExecuteCliCommand(FORMATTED_CLI_NAME, "secrets", "get", "TEST-SECRET-1", "STAGING-SECRET-2", "FOLDER-SECRET-1", "--token", creds.UAAccessToken, "--projectId", creds.ProjectID, "--env", creds.EnvSlug, "--recursive", "--silent")
- fmt.Printf("output: %v\n", output)
-
if err != nil {
t.Fatalf("error running CLI command: %v", err)
}
diff --git a/cli/test/secrets_test.go b/cli/test/secrets_test.go
index aca5f806bc..453666406d 100644
--- a/cli/test/secrets_test.go
+++ b/cli/test/secrets_test.go
@@ -1,7 +1,6 @@
package tests
import (
- "fmt"
"testing"
"github.com/bradleyjkemp/cupaloy/v2"
@@ -12,8 +11,6 @@ func TestServiceToken_SecretsGetWithImportsAndRecursiveCmd(t *testing.T) {
output, err := ExecuteCliCommand(FORMATTED_CLI_NAME, "secrets", "--token", creds.ServiceToken, "--projectId", creds.ProjectID, "--env", creds.EnvSlug, "--recursive", "--silent")
- fmt.Printf("output: %v\n", output)
-
if err != nil {
t.Fatalf("error running CLI command: %v", err)
}
@@ -30,8 +27,6 @@ func TestServiceToken_SecretsGetWithoutImportsAndWithoutRecursiveCmd(t *testing.
output, err := ExecuteCliCommand(FORMATTED_CLI_NAME, "secrets", "--token", creds.ServiceToken, "--projectId", creds.ProjectID, "--env", creds.EnvSlug, "--include-imports=false", "--silent")
- fmt.Printf("output: %v\n", output)
-
if err != nil {
t.Fatalf("error running CLI command: %v", err)
}
@@ -49,8 +44,6 @@ func TestUniversalAuth_SecretsGetWithImportsAndRecursiveCmd(t *testing.T) {
output, err := ExecuteCliCommand(FORMATTED_CLI_NAME, "secrets", "--token", creds.UAAccessToken, "--projectId", creds.ProjectID, "--env", creds.EnvSlug, "--recursive", "--silent")
- fmt.Printf("output: %v\n", output)
-
if err != nil {
t.Fatalf("error running CLI command: %v", err)
}
@@ -68,8 +61,6 @@ func TestUniversalAuth_SecretsGetWithoutImportsAndWithoutRecursiveCmd(t *testing
output, err := ExecuteCliCommand(FORMATTED_CLI_NAME, "secrets", "--token", creds.UAAccessToken, "--projectId", creds.ProjectID, "--env", creds.EnvSlug, "--include-imports=false", "--silent")
- fmt.Printf("output: %v\n", output)
-
if err != nil {
t.Fatalf("error running CLI command: %v", err)
}
@@ -87,8 +78,6 @@ func TestUniversalAuth_SecretsGetWrongEnvironment(t *testing.T) {
output, _ := ExecuteCliCommand(FORMATTED_CLI_NAME, "secrets", "--token", creds.UAAccessToken, "--projectId", creds.ProjectID, "--env", "invalid-env", "--recursive", "--silent")
- fmt.Printf("output: %v\n", output)
-
// Use cupaloy to snapshot test the output
err := cupaloy.Snapshot(output)
if err != nil {