-
Notifications
You must be signed in to change notification settings - Fork 279
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
Refactor lifecycle execution and tests #1539
Conversation
The diff is quite large 😞 but it should be pretty viewable given that it's mostly code deletions (make sure to hide whitespace) lifecycle_execution_test.go is still crying out for improvement (could be made a table test potentially) but this is a step in the right direction |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1539 +/- ##
==========================================
+ Coverage 80.11% 80.13% +0.02%
==========================================
Files 155 155
Lines 10095 10090 -5
==========================================
- Hits 8087 8085 -2
+ Misses 1524 1522 -2
+ Partials 484 483 -1
Flags with carried forward coverage won't be shown. Click here to find out more. |
I think I uncovered bugs as part of this work:
but I think it makes sense to fix them separately so as to not leave any doubt that no logic was changed |
I agree, we can add coverage later |
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.
I ❤️ this refactoring! Just fix the test
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.
Great work! I really like the simplification of the call api
@@ -104,7 +104,7 @@ jobs: | |||
if (Test-Path C:\ProgramData\docker\config\daemon.json) { | |||
$config=(Get-Content C:\ProgramData\docker\config\daemon.json | ConvertFrom-json) | |||
} | |||
$config."insecure-registries" = @("$IPAddress/32") | |||
$config | Add-Member -Force -Name "insecure-registries" -value @("$IPAddress/32") -MemberType NoteProperty |
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.
Thank you for doing this! I had tried, and then dropped the ball with this: #1522
- Don't pass anything in `l.opts` as function arguments (makes things simpler) - Remove duplication in tests by moving configurable inputs to top-level vars Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
96eaa06
to
03f4c69
Compare
Summary
l.opts
as function arguments (makes things simpler)Hopefully this should make this part of the code base a bit easier to understand and make changes to.
Documentation