Skip to content
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

Merged
merged 2 commits into from
Jun 25, 2018

Conversation

vdemeester
Copy link
Collaborator

@vdemeester vdemeester commented Jun 18, 2018

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

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)

image: alpine
init: true`)
assert.NilError(t, err)
assert.Check(t, is.DeepEqual(config, &types.Config{
Copy link
Contributor

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 😇

Copy link
Contributor

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.

Copy link
Member

@thaJeztah thaJeztah left a 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

@thaJeztah
Copy link
Member

ping @silvin-lubecki PTAL; is the test a blocker for you, or ok to merge as-is?

vdemeester and others added 2 commits June 25, 2018 11:13
> 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>
Copy link
Collaborator Author

@vdemeester vdemeester left a 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 👼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants