Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

fix(tests): Allow TLS #2352

Merged
merged 1 commit into from
Nov 4, 2014
Merged

fix(tests): Allow TLS #2352

merged 1 commit into from
Nov 4, 2014

Conversation

johanneswuerbach
Copy link
Contributor

@johanneswuerbach
Copy link
Contributor Author

For now I enabled TLS only when DOCKER_CERT_PATH is defined (boot2docker) as Jenkins requires a connection without TLS.

@johanneswuerbach
Copy link
Contributor Author

Jenkins, test this please.

@bacongobbler
Copy link
Member

Jenkins works, which means it's backwards compatible for non-boot2docker clients. Now we just have to confirm that it works on b2d 1.3 hosts. Thanks @johanneswuerbach :)

@mboersma
Copy link
Member

mboersma commented Nov 3, 2014

Awesome! I will test this locally.

@mboersma mboersma modified the milestone: 0.16 Nov 3, 2014
@mboersma
Copy link
Member

mboersma commented Nov 3, 2014

Edit: See #2373. I'm seeing this repeatedly:

deis-store-gateway running...
--- Run deis/registry:git-909437a at 192.168.59.104:52793
Error response from daemon: No such container: deis-registry-git-909437a
2014-11-03T18:22:17Z ddce9fa42085 confd[32]: ERROR open /docker-registry/config/.config.yml598513258: no such file or directory
registry: waiting for confd to write initial templates...

Can someone else run the tests with boot2docker and see if this is a problem for them?

This may be due to me updating to boot2docker 1.3.1 as well. See also moby/moby#8887.

LGTM:

$ git branch
* johanneswuerbach-patch-6
  master
$ set | grep DOCKER
DOCKER_CERT_PATH=/Users/matt/.boot2docker/certs/boot2docker-vm
DOCKER_HOST=tcp://192.168.59.104:2376
DOCKER_TLS_VERIFY=1
$ docker info
Containers: 1
Images: 49
...
$ make -C logger/ build test-functional
docker build -t logger-build .
Sending build context to Docker daemon 38.91 kB
...
Successfully built e577b2aa7da3
rm -rf image/bin/logger
docker rm -f `docker ps | grep logger-build | awk '{print $1}'`
20d1b6167817
GOPATH=/Users/matt/Projects/src/github.com/deis/deis/logger/../tests/_vendor:/Users/matt/Projects go test -v ./tests/...
=== RUN TestLogger
--- Running deis/test-etcd at 192.168.59.104:51336
Error response from daemon: No such container: deis-etcd-git-909437a
[etcd] Nov  3 17:37:57.284 WARNING   | Using the directory a61f50d5f16f.etcd as the etcd curation directory because a directory was not specified. 
[etcd] Nov  3 17:37:57.284 INFO      | a61f50d5f16f is starting a new cluster
[etcd] Nov  3 17:37:57.286 INFO      | etcd server [name a61f50d5f16f, listen on :51336, advertised url http://192.168.59.104:51336]
[etcd] Nov  3 17:37:57.286 INFO      | peer server [name a61f50d5f16f, listen on :7001, advertised url http://127.0.0.1:7001]
[etcd] Nov  3 17:37:57.286 INFO      | a61f50d5f16f starting in peer mode
[etcd] Nov  3 17:37:57.286 INFO      | a61f50d5f16f: state changed from 'initialized' to 'follower'.
[etcd] Nov  3 17:37:57.288 INFO      | a61f50d5f16f: state changed from 'follower' to 'leader'.
[etcd] Nov  3 17:37:57.289 INFO      | a61f50d5f16f: leader changed from '' to 'a61f50d5f16f'.
--- Run deis/logger:git-909437a at 192.168.59.104:51341
Error response from daemon: No such container: deis-logger-git-909437a
Starting syslog...
Syslog server started...
deis-logger running
Running service test for deis-logger-git-909437a
--- PASS: TestLogger (11.24 seconds)
PASS
ok      github.com/deis/deis/logger/tests   11.248s

I also ran all of test-integration.sh locally with boot2docker on Mac OS X. Thanks again @johanneswuerbach!.

Note to self: remove TLS workaround section from PR #2236 after this is merged.

@bacongobbler
Copy link
Member

that error seems unrelated as we also hit it in a separate test: http://ci.deis.io/job/test-integration/953/

@mboersma
Copy link
Member

mboersma commented Nov 3, 2014

Agreed, the error is not the fault of this PR.

LGTM.

@bacongobbler
Copy link
Member

lgtm

bacongobbler pushed a commit that referenced this pull request Nov 4, 2014
@bacongobbler bacongobbler merged commit ff24fad into deis:master Nov 4, 2014
@johanneswuerbach johanneswuerbach deleted the patch-6 branch November 4, 2014 17:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add docs for disabling TLS in boot2docker
3 participants