-
Notifications
You must be signed in to change notification settings - Fork 197
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(polaris): Remove clutter from JSON output #493
Conversation
Resolves: #449 Signed-off-by: Daniel Pacak <pacak.daniel@gmail.com>
@@ -9,8 +9,7 @@ import ( | |||
"github.com/aquasecurity/starboard/pkg/ext" | |||
"github.com/aquasecurity/starboard/pkg/plugin/polaris" | |||
"github.com/aquasecurity/starboard/pkg/starboard" | |||
"github.com/stretchr/testify/assert" | |||
"github.com/stretchr/testify/require" | |||
"github.com/onsi/gomega" |
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.
On the mission to replace Testify with Gomega matchers, which are more powerful and we use them in integration tests.
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.
Fireside chat: I get the reasoning but I personally would still vote for testify just because I find them simpler to write. gexec is great though for integration tests.
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.
With testify I struggled many times to assert on complex objects / object trees in unit tests. Only Gomega allowed me to do so. On the other hand keeping and learning 2 assert libraries doesn't really make sense from maintenance stand point. But we can think about it and vote what would be the best option.
"--config", "/etc/starboard/polaris.config.yaml", | ||
"--resource", "default/Deployment.apps/v1/nginx", | ||
"-c", | ||
"polaris audit --log-level error --config /etc/starboard/polaris.config.yaml --resource default/Deployment.apps/v1/nginx 2> /dev/null", |
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.
2> /dev/null to get rid of logs from clinet-go, e.g. rate limit warnings
Codecov Report
@@ Coverage Diff @@
## main #493 +/- ##
==========================================
- Coverage 70.25% 69.96% -0.30%
==========================================
Files 62 62
Lines 3994 3992 -2
==========================================
- Hits 2806 2793 -13
- Misses 892 900 +8
- Partials 296 299 +3
Continue to review full report at Codecov.
|
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.
behold our new saviour gomega
Resolves: #449
Signed-off-by: Daniel Pacak pacak.daniel@gmail.com