mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Fix: JSON error check
This commit is contained in:
@@ -33,7 +33,10 @@ func ListSecretsWithImportsAndRecursive(t *testing.T, authToken string, projectI
|
||||
|
||||
var secrets []models.SingleEnvironmentVariable
|
||||
|
||||
json.Unmarshal(commandOutput.Bytes(), &secrets)
|
||||
err := json.Unmarshal(commandOutput.Bytes(), &secrets)
|
||||
if err != nil {
|
||||
t.Errorf("Error: %v", err)
|
||||
}
|
||||
|
||||
if len(secrets) == 0 {
|
||||
t.Errorf("No secrets found")
|
||||
@@ -79,7 +82,10 @@ func GetSecretsByNames(t *testing.T, authToken string, projectId string, envSlug
|
||||
|
||||
var secrets []models.SingleEnvironmentVariable
|
||||
|
||||
json.Unmarshal(commandOutput.Bytes(), &secrets)
|
||||
err := json.Unmarshal(commandOutput.Bytes(), &secrets)
|
||||
if err != nil {
|
||||
t.Errorf("Error: %v", err)
|
||||
}
|
||||
|
||||
assert.Len(t, secrets, len(ALL_SECRETS))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user