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

Added container name to create container command. #44

Merged
merged 1 commit into from
Apr 16, 2015

Conversation

MartinAhrer
Copy link
Contributor

Next, I will start adding container linking as suggested in issue #42

@bmuschko
Copy link
Owner

bmuschko commented Apr 3, 2015

Thanks for your pull request. Would you mind adding an integration test as well? Please have a look at DockerWorkflowIntegrationTest.groovy.

@MartinAhrer
Copy link
Contributor Author

Sure, didn't spot that test before. Thanks for the pointer! Will update my pull request. Is there a specific local docker setup required. The workflow tests seem to be skipped on my ubuntu based machine with a docker daemon running.

@MartinAhrer
Copy link
Contributor Author

I have added your requested integration test. Actually I enhanced your "Can build an image, create and start a container" test. It is now adding a container name and then inspecting the container. However, I still can't execute the tests they are skipped. So the pull-request is not yet ready for merge !

@@ -60,4 +60,8 @@ repositories {
protected String createUniqueImageId() {
"gradle/${UUID.randomUUID().toString().replaceAll('-', '')}"
}

protected String createUniqueContainerName() {
Copy link
Owner

Choose a reason for hiding this comment

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

Instead of adding a new method I think we should simply rename the existing method createUniqueImageId to something else. Probably just createUniqueId.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I will refactor that. Didn't want to interfere too much with the other test code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Finally I realized that a container name may not contain a '/' like the image id. So I have kept the 2 methods.

@bmuschko
Copy link
Owner

You can now adapt to your Docker setup (see FAQ for more information). To be able to execute the test, you'll have to make sure that the Docker server URL is resolvable.

@MartinAhrer
Copy link
Contributor Author

I had to add a DockerInspectContainer task type in order to facilitate testing. However I was wondering of what use those Inspect tasks are as they are just logging some image/container attributes. How about exposing the full inspect response to the task client? Generally speaking I think a inspect task will be useful for querying any image/container attribute.
Certainly it is a difficult decision what format the response of the inspect task would be? JSON or some typed data structure. The latter would mean that it is a lot of work to keep it in sync with the docker-java implementation.

@bmuschko
Copy link
Owner

Thanks for the pull request. It has been merged.

@MartinAhrer
Copy link
Contributor Author

Thanks for supporting, expect a new pull-request for container linking soon.

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.

2 participants