-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add init
support in 3.7 schema
#1129
Conversation
cli/compose/loader/loader_test.go
Outdated
image: alpine | ||
init: true`) | ||
assert.NilError(t, err) | ||
assert.Check(t, is.DeepEqual(config, &types.Config{ |
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 think you can just check the Init value, checking the equality on all the Config is a little bit extreme here:
assert.Equal(t, isconfig.Services[0].Init, &booleanTrue)
You may argue that then you have to check Services length before, but I think we can skip it 😇
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.
Then you can refactor the test with these 3 cases using Table Tests.
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
but agree that just checking for the boolean may be sufficient in the tests
ping @silvin-lubecki PTAL; is the test a blocker for you, or ok to merge as-is? |
> Run an init inside the container that forwards signals and reaps processes This is supported on `run` and now on Swarm services too, so it's also possible to have in on a composefile :). Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
581287a
to
3805674
Compare
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 on @silvin-lubecki commit 👼
This is supported on
run
and now on Swarm services too, so it's alsopossible to have in on a composefile :).
Signed-off-by: Vincent Demeester vincent@sbr.pm
follow up to #479
fixes #51
fixes moby/moby#34639
fixes moby/swarmkit#2173
- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)