-
Notifications
You must be signed in to change notification settings - Fork 102
Add unreferenced file integration tests #1399
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1399 +/- ##
==========================================
- Coverage 86.28% 85.28% -1.00%
==========================================
Files 102 102
Lines 12572 12928 +356
==========================================
+ Hits 10848 11026 +178
- Misses 1248 1416 +168
- Partials 476 486 +10 see 23 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
test/integration/managementplane/config_apply_unreferenced_files_test.go
Show resolved
Hide resolved
test/integration/managementplane/config_apply_unreferenced_files_test.go
Show resolved
Hide resolved
test/integration/managementplane/config_apply_unreferenced_files_test.go
Outdated
Show resolved
Hide resolved
test/integration/managementplane/config_apply_unreferenced_files_test.go
Outdated
Show resolved
Hide resolved
| "test", "-f", "/etc/nginx/test/unreferenced_file.conf", | ||
| }) | ||
| s.Require().NoError(err) | ||
| s.Equal(0, code) |
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.
Should this be checking if the code is 1?
| s.Equal(mpi.CommandResponse_COMMAND_STATUS_OK, responses[0].GetCommandResponse().GetStatus()) | ||
| s.Equal("Config apply successful", responses[0].GetCommandResponse().GetMessage()) | ||
|
|
||
| code, _, err = utils.Container.Exec(s.ctx, []string{ |
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 add these file checks to all the tests in this test suite?
Proposed changes
Add unreferenced file support to the mock management plane and add integration tests for it.
When sending a config apply request through the mock, the mock looks at the request body to identify unreferenced files. Here is a sample request body of a config apply that contains an unreferenced file:
Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTINGdocumentmake install-toolsand have attached any dependency changes to this pull requestREADME.md)