Skip to content
This repository has been archived by the owner on Mar 28, 2018. It is now read-only.

Commit

Permalink
Merge pull request #1012 from chavafg/topic/fix_nginx
Browse files Browse the repository at this point in the history
tests: Use nginx:1.13.0 for swarm tests
  • Loading branch information
jcvenegas authored Jun 26, 2017
2 parents 558dc80 + 191e9f8 commit fa8a0d0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/integration/docker/dns.bats
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ setup() {
$DOCKER_EXE service create \
--name "${SERVICE1_NAME}" \
--replicas $number_of_replicas \
--publish 8080:80 nginx /bin/bash \
--publish 8080:80 "${nginx_image}" /bin/bash \
-c "hostname > /usr/share/nginx/html/hostname; nginx -g \"daemon off;\""

info "create service ${SERVICE2_NAME}"
$DOCKER_EXE service create \
--name "${SERVICE2_NAME}" \
--replicas $number_of_replicas \
--publish 8082:80 nginx /bin/bash \
--publish 8082:80 "${nginx_image}" /bin/bash \
-c "hostname > /usr/share/nginx/html/hostname; nginx -g \"daemon off;\""

info "create service ${DNS_TEST_SERVICE_NAME}"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/docker/swarm.bats
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ setup() {
$DOCKER_EXE service create \
--name "${SERVICE_NAME}" \
--replicas $number_of_replicas \
--publish 8080:80 nginx /bin/bash \
--publish 8080:80 "${nginx_image}" /bin/bash \
-c "hostname > /usr/share/nginx/html/hostname; nginx -g \"daemon off;\""
check_swarm_replicas "$number_of_replicas" "${SERVICE_NAME}" "$timeout"
}
Expand Down
5 changes: 5 additions & 0 deletions tests/lib/test-common.bash.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ HYPERVISOR_PATH="@QEMU_PATH@"
CC_SHIM_PATH="/usr/libexec/cc-shim"
number_of_attempts=5

# Using Tag 1.13.0 for nginx image beause latest one does not
# provide 'ip' command used in swarm tests.
# See https://github.com/01org/cc-oci-runtime/issues/1014 for more information
nginx_image="nginx:1.13.0"

# Checking that default runtime is cor
function runtime_docker(){
default_runtime=`$DOCKER_EXE info 2>/dev/null | grep "^Default Runtime" | cut -d: -f2 | tr -d '[[:space:]]'`
Expand Down

0 comments on commit fa8a0d0

Please sign in to comment.