Skip to content

Commit

Permalink
fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
aganesh-suse committed Apr 5, 2024
1 parent 903c9a7 commit d8c9f37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/testcase/secretsencrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestSecretsEncryption() {

ips := getNodeIps(nodes)

errSecret := shared.CreateSecret("secret1", "default")
errSecret := shared.CreateSecret("secret1", "default", false)
Expect(errSecret).NotTo(HaveOccurred(), "error creating secret")

shared.LogLevel("INFO", "TEST: 'CLASSIC' Secrets Encryption method")
Expand Down
6 changes: 4 additions & 2 deletions shared/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ func FetchToken(ip string) (string, error) {
return token, nil
}

func CreateSecret(secret, namespace string) error {
func CreateSecret(secret, namespace string, print bool) error {
kubectl := fmt.Sprintf("kubectl --kubeconfig %s", KubeConfigFile)
if namespace == "" {
namespace = "default"
Expand All @@ -648,7 +648,9 @@ func CreateSecret(secret, namespace string) error {
if strings.Contains(createStdOut, "failed to create secret") {
return ReturnLogError("failed to create secret: \n%w", err)
}
LogLevel("DEBUG", "Create Secret Output: %s", createStdOut)
if print {
LogLevel("DEBUG", "Create Secret Output: %s", createStdOut)
}
return nil
}

Expand Down

0 comments on commit d8c9f37

Please sign in to comment.