-
Notifications
You must be signed in to change notification settings - Fork 6.4k
fix: allow flags to be set when auto-sync
is disabled (#24328)
#24380
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: master
Are you sure you want to change the base?
Conversation
Signed-off-by: downfa11 <[email protected]>
Signed-off-by: downfa11 <[email protected]>
🔴 Preview Environment stopped on BunnyshellSee: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
Signed-off-by: downfa11 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #24380 +/- ##
==========================================
+ Coverage 60.29% 60.37% +0.07%
==========================================
Files 350 350
Lines 59959 60038 +79
==========================================
+ Hits 36155 36247 +92
+ Misses 20909 20881 -28
- Partials 2895 2910 +15 ☔ View full report in Codecov by Sentry. |
cmd/util/app_test.go
Outdated
f.spec.SyncPolicy = nil | ||
require.NoError(t, f.SetFlag("auto-prune", "true")) | ||
require.NotNil(t, f.spec.SyncPolicy) | ||
require.NotNil(t, f.spec.SyncPolicy.Automated) |
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.
missing an assert to validate that spec.SyncPolicy.Automated.Enabled
is false`.
- It should be validated that if
enabled: true
(or not nil), then setting the flag will keep enabled to true.
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.
In the current app_test.go
, the logic causes one test to affect another.
I added a Reset()
method to prevent them from interfering with one another.
Signed-off-by: downfa11 <[email protected]>
Fixes[#24328]
cmd/util/app.go
: options like--auto-prune
are allowed to cases where auto-sync is disabled.cmd/util/app_test.go
: a test added to validate the updated option.cmd/util/app.go
,docs/user-guide/commands/*
: examples like 'when sync is automated' updated.Checklist: