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

Implement service integration tests #24133

Merged
merged 1 commit into from
Jul 6, 2016

Conversation

cpuguy83
Copy link
Member

This is done in a hacky way as currently there is no better way (that I know of).
Uses known implementation details about how tasks are scheduled to be
able to operate on the underlying container.

The one test I added is actually exposing a bug (fixed by #23947). Once this is merged we should add more tests to ensure that resulting containers match expectations from a service spec.
I've intentionally put these tests and related helpers into files with _hack_ in the name so once there is a better way, we can clean these up easily.

I would be worried about releasing 1.12 without more tests like this.

@cpuguy83 cpuguy83 added this to the 1.12.0 milestone Jun 29, 2016
@cpuguy83 cpuguy83 force-pushed the hacky_swarm_integration_tests branch from 2ff9685 to 3fcee97 Compare June 29, 2016 18:05
@cpuguy83 cpuguy83 changed the title Implement swarmkit->engine integration tests Implement swarm integration tests Jun 29, 2016
@cpuguy83 cpuguy83 changed the title Implement swarm integration tests Implement service integration tests Jun 29, 2016
@thaJeztah
Copy link
Member

ping @vdemeester: there you go! 😄

@@ -19,6 +20,7 @@ type SwarmDaemon struct {
swarm.Info
port int
listenAddr string
suite *DockerSwarmSuite
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this being used?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hHuzzah, I'm not! I was but I guess I ended up not needing it anymore.

@cpuguy83 cpuguy83 force-pushed the hacky_swarm_integration_tests branch from 9d00e11 to 8a9b659 Compare June 29, 2016 19:58
id := strings.TrimSpace(out)

var tasks []swarm.Task
wait(c, 30*time.Second, func() bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

30 -> defaultReconciliationTimeout. Also I think waitAndAssert function should be usable here and provides better output.

@cpuguy83 cpuguy83 force-pushed the hacky_swarm_integration_tests branch 2 times, most recently from eebeb57 to e4f83a7 Compare June 30, 2016 01:25
@cpuguy83
Copy link
Member Author

Updated

@tonistiigi
Copy link
Member

@cpuguy83 Windows tests are failing because of missing build tags.

@aaronlehmann aaronlehmann added the status/failing-ci Indicates that the PR in its current state fails the test suite label Jul 1, 2016
@cpuguy83 cpuguy83 force-pushed the hacky_swarm_integration_tests branch from e4f83a7 to 86c5bc1 Compare July 5, 2016 19:35
This is done in a hacky way as currently there is no better way.
Uses known implementation details about how tasks are scheduled to be
able to operate on the underlying container.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83 cpuguy83 force-pushed the hacky_swarm_integration_tests branch from 86c5bc1 to e5ec575 Compare July 6, 2016 01:40
@cpuguy83 cpuguy83 removed the status/failing-ci Indicates that the PR in its current state fails the test suite label Jul 6, 2016
@cpuguy83
Copy link
Member Author

cpuguy83 commented Jul 6, 2016

This is now 100% working and ready for review.

@tonistiigi
Copy link
Member

LGTM

@LK4D4
Copy link
Contributor

LK4D4 commented Jul 6, 2016

LGTM

@LK4D4 LK4D4 merged commit 6f052ed into moby:master Jul 6, 2016
@cpuguy83 cpuguy83 deleted the hacky_swarm_integration_tests branch July 6, 2016 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants