-
Notifications
You must be signed in to change notification settings - Fork 297
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
Pass --volume options to creator phase #675
Conversation
Resolves #674 Signed-off-by: Simon Jones <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #675 +/- ##
==========================================
- Coverage 72.65% 72.49% -0.16%
==========================================
Files 67 67
Lines 4866 4877 +11
==========================================
Hits 3535 3535
- Misses 1010 1021 +11
Partials 321 321
|
Signed-off-by: Simon Jones <[email protected]>
Signed-off-by: Simon Jones <[email protected]>
_ = os.Remove(buildpackTgz) | ||
_ = h.DockerRmi(dockerCli, repoName) | ||
|
||
h.AssertNil(t, os.RemoveAll(tempVolume)) | ||
_ = os.RemoveAll(tempVolume) |
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.
Why did you remove the assertions?
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.
The test is now skippable, so cleanup can reasonably expect to fail when it's skipped
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.
You're right! Thanks for the clarification!
internal/build/phases_test.go
Outdated
h.AssertNil(t, err) | ||
|
||
configProvider := fakePhaseFactory.NewCalledWithProvider | ||
h.AssertEq(t, configProvider.HostConfig().NetworkMode, container.NetworkMode(expectedNetworkMode)) | ||
}) | ||
|
||
it("configures the phase with both cache binds and custom volume mounts", func() { |
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.
Since you added this check, maybe we can remove the tests on lines 212 and 332
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.
They still test slightly different circumstances - the difference between publish and not, as well as ensuring the cache binds will be configured regardless of whether a custom volume is configured.
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.
You're right but I'm not sure if I would keep all 3 tests. I think it's a little confusing that we're testing part of it 3 times.
Maybe we change this test to test only the configuration with custom volume mounts, and to keep the other tests to test only the cache and launch-cache.
What do you think about 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.
I opted to remove this test, and add custom volume mounts to the existing bind tests which cover both the publish=true
and publish=false
contexts.
Signed-off-by: Simon Jones <[email protected]>
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 making these changes!
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!
✔️ Accepted
|
This resolves a bug where we weren't configuring the
creator
phase with any binds configured with the--volume
optionResolves #674
Signed-off-by: Simon Jones [email protected]