Fix TLS IT for docker-machine (#6379)

This commit is contained in:
Jonathan Wei 2018-09-26 12:59:05 -07:00 committed by GitHub
parent 6843cbba1d
commit 6a909c85d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 9 additions and 1 deletions

View File

@ -43,8 +43,11 @@ Set the docker environment:
```
eval "$(docker-machine env integration)"
export DOCKER_IP=$(docker-machine ip integration)
export DOCKER_MACHINE_IP=$(docker-machine inspect integration | jq -r .Driver[\"HostOnlyCIDR\"])
```
The final command uses the `jq` tool to read the Driver->HostOnlyCIDR field from the `docker-machine inspect` output. If you don't wish to install `jq`, you will need to set DOCKER_MACHINE_IP manually.
## Running tests
To run all the tests using docker and mvn run the following command:

View File

@ -27,6 +27,7 @@ basicConstraints=CA:FALSE,pathlen:0
IP.1 = ${DOCKER_HOST_IP}
IP.2 = 127.0.0.1
IP.3 = 172.172.172.1
IP.4 = ${DOCKER_MACHINE_IP:=127.0.0.1}
DNS.1 = ${HOSTNAME}
DNS.2 = localhost
EOT

View File

@ -27,6 +27,7 @@ basicConstraints=CA:FALSE,pathlen:0
IP.1 = ${DOCKER_HOST_IP}
IP.2 = 127.0.0.1
IP.3 = 172.172.172.1
IP.4 = ${DOCKER_MACHINE_IP:=127.0.0.1}
DNS.1 = ${HOSTNAME}
DNS.2 = localhost
EOT

View File

@ -2,7 +2,6 @@
export DOCKER_HOST_IP=$(resolveip -s $HOSTNAME)
# Generate a client cert with an incorrect hostname for testing
cat <<EOT > invalid_hostname_csr.conf
[req]

View File

@ -58,6 +58,7 @@ basicConstraints=CA:FALSE,pathlen:0
IP.1 = ${DOCKER_HOST_IP}
IP.2 = 127.0.0.1
IP.3 = 172.172.172.1
IP.4 = ${DOCKER_MACHINE_IP:=127.0.0.1}
DNS.1 = ${HOSTNAME}
DNS.2 = localhost
EOT

View File

@ -28,6 +28,7 @@ basicConstraints=CA:FALSE,pathlen:0
IP.1 = ${DOCKER_HOST_IP}
IP.2 = 127.0.0.1
IP.3 = 172.172.172.1
IP.4 = ${DOCKER_MACHINE_IP:=127.0.0.1}
DNS.1 = ${HOSTNAME}
DNS.2 = localhost

View File

@ -27,6 +27,7 @@ basicConstraints=CA:FALSE,pathlen:0
IP.1 = ${DOCKER_HOST_IP}
IP.2 = 127.0.0.1
IP.3 = 172.172.172.1
IP.4 = ${DOCKER_MACHINE_IP:=127.0.0.1}
DNS.1 = ${HOSTNAME}
DNS.2 = localhost
EOT

View File

@ -58,6 +58,7 @@ basicConstraints=CA:FALSE,pathlen:0
IP.1 = ${DOCKER_HOST_IP}
IP.2 = 127.0.0.1
IP.3 = 172.172.172.1
IP.4 = ${DOCKER_MACHINE_IP:=127.0.0.1}
DNS.1 = ${HOSTNAME}
DNS.2 = localhost
EOT