diff --git a/Makefile b/Makefile index be615e9d08..05891410df 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ TIMEOUT := 60 # union for 'make test' -UNION := functional docker crio docker-compose netmon docker-stability openshift kubernetes swarm vm-factory entropy ramdisk +UNION := functional docker crio docker-compose network netmon docker-stability openshift kubernetes swarm vm-factory entropy ramdisk # skipped test suites for docker integration tests SKIP := @@ -93,6 +93,7 @@ vm-factory: network: + systemctl is-active --quiet docker || sudo systemctl start docker bash -f .ci/install_bats.sh bats integration/network/macvlan/macvlan_driver.bats bats integration/network/ipvlan/ipvlan_driver.bats diff --git a/integration/network/ipvlan/ipvlan_driver.bats b/integration/network/ipvlan/ipvlan_driver.bats index 577b566977..e5d9ca601a 100644 --- a/integration/network/ipvlan/ipvlan_driver.bats +++ b/integration/network/ipvlan/ipvlan_driver.bats @@ -60,14 +60,15 @@ setup() { # Run the first container docker run -d --runtime=kata-runtime --network=${NETWORK_NAME} --ip=${FIRST_IP} \ - --name=${FIRST_CONTAINER_NAME} --runtime=runc ${IMAGE} sh -c ${PAYLOAD} + --name=${FIRST_CONTAINER_NAME} --runtime=runc ${IMAGE} ${PAYLOAD} # Run the second container docker run -d --runtime=kata-runtime --network=${NETWORK_NAME} --ip=${SECOND_IP} \ - --name=${SECOND_CONTAINER_NAME} --runtime=runc ${IMAGE} sh -c ${PAYLOAD} + --name=${SECOND_CONTAINER_NAME} --runtime=runc ${IMAGE} ${PAYLOAD} # Ping to the first container run docker exec ${SECOND_CONTAINER_NAME} sh -c "ping -c ${PACKET_NUMBER} ${FIRST_IP}" + echo "$status" [ "$status" -eq 0 ] } @@ -81,11 +82,11 @@ setup() { # Run the first container docker run -d --runtime=kata-runtime --network=${NETWORK_NAME} --ip=${FIRST_IP} \ - --name=${FIRST_CONTAINER_NAME} --runtime=runc ${IMAGE} sh -c ${PAYLOAD} + --name=${FIRST_CONTAINER_NAME} --runtime=runc ${IMAGE} ${PAYLOAD} # Run the second container docker run -d --runtime=kata-runtime --network=${NETWORK_NAME} --ip=${SECOND_IP} \ - --name=${SECOND_CONTAINER_NAME} --runtime=runc ${IMAGE} sh -c ${PAYLOAD} + --name=${SECOND_CONTAINER_NAME} --runtime=runc ${IMAGE} ${PAYLOAD} # Ping to the first container run docker exec ${SECOND_CONTAINER_NAME} sh -c "ping -c ${PACKET_NUMBER} ${FIRST_IP}" @@ -101,7 +102,7 @@ teardown() { # Remove experimental flag check_which_flag=$(grep -c -x '{"experimental":true}' $docker_configuration_file) if [ $check_which_flag -eq 1 ]; then - rm -f $docker_configuration_path + rm -rf $docker_configuration_path else sed -i 's|"experimental": true,||' $docker_configuration_file fi diff --git a/integration/network/macvlan/macvlan_driver.bats b/integration/network/macvlan/macvlan_driver.bats index 8f65fd2adc..eceab08cd5 100644 --- a/integration/network/macvlan/macvlan_driver.bats +++ b/integration/network/macvlan/macvlan_driver.bats @@ -36,7 +36,7 @@ setup () { docker run -d --runtime=${RUNTIME} --network=${NETWORK_NAME} --name=${FIRST_CONTAINER_NAME} ${IMAGE} sh -c "tail -f /dev/null" # Verify ip address - ip_address=$(docker inspect --format "{{.NetworkSettings.IPAddress}}" ${FIRST_CONTAINER_NAME}) + ip_address=$(docker inspect --format "{{.NetworkSettings.Networks.$NETWORK_NAME.IPAddress}}" ${FIRST_CONTAINER_NAME}) if [ -z "$ip_address" ]; then echo >&2 "ERROR: Container ip address not found" exit 1