Skip to content

Commit

Permalink
update test assertion
Browse files Browse the repository at this point in the history
Signed-off-by: Simar <simar@linux.com>
  • Loading branch information
simar7 committed Jul 7, 2023
1 parent 47cd724 commit 61291d3
Showing 1 changed file with 24 additions and 34 deletions.
58 changes: 24 additions & 34 deletions pkg/cloud/aws/commands/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,45 +304,13 @@ const expectedCustomScanResult = `{
}
},
"Results": [
{
"Target": "",
"Class": "config",
"Type": "cloud",
"MisconfSummary": {
"Successes": 1,
"Failures": 0,
"Exceptions": 0
},
"Misconfigurations": [
{
"Type": "AWS",
"Title": "No example buckets",
"Description": "Buckets should not be named with \"example\" in the name",
"Namespace": "user.whatever",
"Query": "deny",
"Severity": "LOW",
"References": [
""
],
"Status": "PASS",
"Layer": {},
"CauseMetadata": {
"Provider": "cloud",
"Service": "s3",
"Code": {
"Lines": null
}
}
}
]
},
{
"Target": "arn:aws:s3:::examplebucket",
"Class": "config",
"Type": "cloud",
"MisconfSummary": {
"Successes": 1,
"Failures": 9,
"Failures": 10,
"Exceptions": 0
},
"Misconfigurations": [
Expand Down Expand Up @@ -584,6 +552,28 @@ const expectedCustomScanResult = `{
"Lines": null
}
}
},
{
"Type": "AWS",
"Title": "No example buckets",
"Description": "Buckets should not be named with \"example\" in the name",
"Message": "example bucket detected",
"Namespace": "user.whatever",
"Query": "deny",
"Severity": "LOW",
"References": [
""
],
"Status": "FAIL",
"Layer": {},
"CauseMetadata": {
"Resource": "arn:aws:s3:::examplebucket",
"Provider": "cloud",
"Service": "s3",
"Code": {
"Lines": null
}
}
}
]
}
Expand Down Expand Up @@ -1087,7 +1077,7 @@ deny[res] {
inputData: `{
"settings": {
"DS123": {
"ignore_deletion_protection": false
"ignore_deletion_protection": true
}
}
}
Expand Down

0 comments on commit 61291d3

Please sign in to comment.