-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Orchestrator - Discovery + Run scan job #3
Changes from 1 commit
2494e88
7135862
7c07e9e
1812b5a
a96f3a2
a99ee23
78c902d
da39798
5fbb089
b3efb7f
048701f
311b738
827ba21
84fc1de
a5c4676
0cf422b
f3f8610
30975bf
d6f276b
aa9dc6d
b6b1935
5dc3c09
2504140
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -314,7 +314,7 @@ func Test_hasExcludedTags(t *testing.T) { | |
want: false, | ||
}, | ||
{ | ||
name: "instance has excluded tags", | ||
name: "instance does not have ALL the excluded tags", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. worth also adding a test where one of the tags in the excluded is not matched (case of partial matching) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is also this test- instance does not have ALL the excluded tags |
||
args: args{ | ||
excludeTags: []Tag{ | ||
{ | ||
|
@@ -337,10 +337,40 @@ func Test_hasExcludedTags(t *testing.T) { | |
}, | ||
}, | ||
}, | ||
want: false, | ||
}, | ||
{ | ||
name: "instance has ALL excluded tags", | ||
args: args{ | ||
excludeTags: []Tag{ | ||
{ | ||
key: tagName1, | ||
val: tagVal1, | ||
}, | ||
{ | ||
key: tagName2, | ||
val: tagVal2, | ||
}, | ||
}, | ||
instanceTags: []ec2types.Tag{ | ||
{ | ||
Key: &tagName1, | ||
Value: &tagVal1, | ||
}, | ||
{ | ||
Key: &tagName2, | ||
Value: &tagVal2, | ||
}, | ||
{ | ||
Key: utils.StringPtr("stam"), | ||
Value: utils.StringPtr("stam"), | ||
}, | ||
}, | ||
}, | ||
want: true, | ||
}, | ||
{ | ||
name: "instance does not have excluded tags", | ||
name: "instance does not have excluded tags at all", | ||
args: args{ | ||
excludeTags: []Tag{ | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// then an instance will be excluded only if it has ALL these tags ({tag1:val1, tag2:val2})