-
Notifications
You must be signed in to change notification settings - Fork 66
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: reconcile after configuration's hcl changed #360
Conversation
Signed-off-by: xingming01 <whatissoftware@163.com>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #360 +/- ##
==========================================
- Coverage 79.31% 77.54% -1.77%
==========================================
Files 23 24 +1
Lines 1750 2053 +303
==========================================
+ Hits 1388 1592 +204
- Misses 278 366 +88
- Partials 84 95 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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.
Generally LGTM, please add some test.
if kerrors.IsNotFound(err) { | ||
return nil | ||
} | ||
return err |
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.
if kerrors.IsNotFound(err) { | |
return nil | |
} | |
return err | |
return client.IgnoreNotFound(err) |
Signed-off-by: xingming01 <whatissoftware@163.com>
Added, thanks |
"create configuration for the first time": { | ||
args: args{ | ||
meta: &TFConfigurationMeta{ | ||
ConfigurationCMName: "aa", | ||
Namespace: "b", | ||
ControllerNamespace: "b", | ||
}, | ||
configurationType: "HCL", | ||
}, | ||
want: want{ | ||
errMsg: "", |
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.
Case "Configuration is changed" is not tested, which is the point of this PR. Can you add some test for that?
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.
Case "Configuration is changed" is not tested, which is the point of this PR. Can you add some test for that?
A case "Configuration changed, and reconcile"" was added
Signed-off-by: xingming01 <whatissoftware@163.com>
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
Reconcile again after configuration's hcl changed
Fixes #359