This repository has been archived by the owner on Jul 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge in AEG/aegis from hotfix/INTEL-729 to development * commit 'bde11319182880a7409f24dadf84987f9ac40d86': Added and removed some error handling Added comments to explain chances that were made Refactored logic for GetCloudAccountEvaluations to predetermine clould account types and only make one call to qualys
- Loading branch information
Showing
5 changed files
with
77 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ dev.json | |
exceptions/ | ||
prod.json | ||
*app.json | ||
prod.json | ||
*.xml | ||
*.csv | ||
scaffold.json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package qualys | ||
|
||
import ( | ||
"github.com/stretchr/testify/assert" | ||
"testing" | ||
) | ||
|
||
func TestGetAccountType(t *testing.T) { | ||
t.Run("Should return as an AWS account", func(t *testing.T) { | ||
mockAWS := "123456789012" | ||
assert.Equal(t,AWS_CLOUD_ACCOUNT,getAccountType(mockAWS)) | ||
}) | ||
t.Run("Should return as an Azure account", func(t *testing.T) { | ||
mockAzure := "20ff7fc3-e762-44dd-bd96-b71116dcdc23" | ||
assert.Equal(t,AZURE_CLOUD_ACCOUNT,getAccountType(mockAzure)) | ||
}) | ||
t.Run("Should return as an GCP account", func(t *testing.T) { | ||
mockGCP := "12we" | ||
assert.Equal(t,GOOGLE_CLOUD_ACCOUNT,getAccountType(mockGCP)) | ||
}) | ||
|
||
} | ||
|