-
Notifications
You must be signed in to change notification settings - Fork 213
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: Test grafana dashboards in hubble deploy #650
Conversation
@microsoft-github-policy-service agree |
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.
Thanks for taking up this change @whatnick ! Mainly just had a thought about refactoring
deploy/hubble/grafana/dashboards/simplify-grafana-overwrite_test.go
Outdated
Show resolved
Hide resolved
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.
This is great, thank you @whatnick ! If you haven't yet, could you just double check that simplifying dashboards works with the new make
code? I would suggest locally reverting one of the deploy/hubble/ json files and seeing if it changes again after running make
.
Yep manual changes get reverted by the test in overwrite mode. |
Description
Closes #501
Related Issue
The refactored hubble deployment included in grafana dashboard testing. Also renamed the dashboards folder to match the
grafana
application and the Makefile setup. This make phony is not run in CI and tests are run viamake test
so this folder issue does not show up.Checklist
git commit -S -s ...
). See this documentation on signing commits.Screenshots (if applicable) or Testing Completed
go test ./... -tags=dashboard -v === RUN TestDashboardsAreSimplified simplify-grafana_test.go:21: verifying that dashboard is simplified: ../../../hubble/grafana/dashboards/clusters.json simplify-grafana_test.go:21: verifying that dashboard is simplified: ../../../hubble/grafana/dashboards/dns.json simplify-grafana_test.go:21: verifying that dashboard is simplified: ../../../hubble/grafana/dashboards/pod-flows-namespace.json simplify-grafana_test.go:21: verifying that dashboard is simplified: ../../../hubble/grafana/dashboards/pod-flows-workload.json simplify-grafana_test.go:21: verifying that dashboard is simplified: ../../../legacy/grafana/dashboards/clusters.json simplify-grafana_test.go:21: verifying that dashboard is simplified: ../../../legacy/grafana/dashboards/dns.json simplify-grafana_test.go:21: verifying that dashboard is simplified: ../../../legacy/grafana/dashboards/pod-level.json --- PASS: TestDashboardsAreSimplified (0.01s) PASS ok github.com/microsoft/retina/deploy/testutils/grafana/dashboards (cached)
Additional Notes
This PR duplicates code if more dashboard folders are added it would perhaps be useful to improve the go test code to receive a list of folders instead.
Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.