Skip to content

Commit

Permalink
fix(ISV-5130): use tabs to indent
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Jediny <jedinym@proton.me>
  • Loading branch information
jedinym committed Nov 18, 2024
1 parent dc86752 commit 92f3855
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions tests/release/releaseLib.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,40 +144,40 @@ func CheckReleaseStatus(releaseCR *releaseApi.Release) (error) {
// It populates the Secret data fields based on the mapping of fields to
// environment variables containing the base64 encoded field data.
func CreateOpaqueSecret(
fw *framework.Framework,
namespace, secretName string,
fieldEnvMap map[string]string,
fw *framework.Framework,
namespace, secretName string,
fieldEnvMap map[string]string,
) {
secretData := make(map[string][]byte)
secretData := make(map[string][]byte)

for field, envVar := range fieldEnvMap {
envValue := os.Getenv(envVar)
Expect(envValue).ToNot(BeEmpty())
for field, envVar := range fieldEnvMap {
envValue := os.Getenv(envVar)
Expect(envValue).ToNot(BeEmpty())

decodedValue, err := base64.StdEncoding.DecodeString(envValue)
Expect(err).ToNot(HaveOccurred())
decodedValue, err := base64.StdEncoding.DecodeString(envValue)
Expect(err).ToNot(HaveOccurred())

secretData[field] = decodedValue
}
secretData[field] = decodedValue
}

secret, err := fw.AsKubeAdmin.CommonController.GetSecret(
namespace,
secretName,
)
if secret == nil || errors.IsNotFound(err) {
secret := &corev1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: secretName,
Namespace: namespace,
},
Type: corev1.SecretTypeOpaque,
Data: secretData,
}

_, err = fw.AsKubeAdmin.CommonController.CreateSecret(
namespace,
secret,
)
Expect(err).ToNot(HaveOccurred())
}
if secret == nil || errors.IsNotFound(err) {
secret := &corev1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: secretName,
Namespace: namespace,
},
Type: corev1.SecretTypeOpaque,
Data: secretData,
}

_, err = fw.AsKubeAdmin.CommonController.CreateSecret(
namespace,
secret,
)
Expect(err).ToNot(HaveOccurred())
}
}

0 comments on commit 92f3855

Please sign in to comment.