-
Notifications
You must be signed in to change notification settings - Fork 152
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
Fix false positive on aws_route resources #404
Conversation
Codecov Report
@@ Coverage Diff @@
## v0.7 #404 +/- ##
==========================================
+ Coverage 69.42% 69.46% +0.03%
==========================================
Files 281 281
Lines 6032 6039 +7
==========================================
+ Hits 4188 4195 +7
Misses 1491 1491
Partials 353 353
|
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.
LGTM
@@ -63,11 +63,21 @@ func TestAwsRouteTableExpander_Execute(t *testing.T) { | |||
}, | |||
}, | |||
{ | |||
"test route are expanded", | |||
"test routes are expanded except when it already exist", |
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.
it already exists
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.
Can you, instead of changing the two current tests, create a new one. One test that won't expand already created routes in a default and a non-default route-table ?
2c48b69
to
2077d3c
Compare
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.
Almost all good, I got a small on DRY
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.
Still one last readability comment
following code review feedback. pkg/middlewares/aws_route_table_expander.go
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.
ππ»
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.
GO !
Description
The AWS route table expander middleware was supposed to turn routes embeded in a route table into dedicated resources. But when a route is already a dedicated resource, the scan result shows it as a deleted resource.