@@ -25,10 +25,10 @@ function create_machine() {
2525
2626 # Allow for the machine to boot and get an IP
2727 sleep 20
28- tar cf - ./tests | lxc exec $NAME -- tar xvf - -C /var/tmp
28+ tar cf - ./tests | lxc exec $NAME -- tar xvf - -C /root
2929 DISTRO_DEPS_TMP=" ${DISTRO//:/ _} "
3030 DISTRO_DEPS=" ${DISTRO_DEPS_TMP//// -} "
31- lxc exec $NAME -- /bin/bash " /var/tmp /tests/lxc/install-deps/$DISTRO_DEPS "
31+ lxc exec $NAME -- /bin/bash " /root /tests/lxc/install-deps/$DISTRO_DEPS "
3232 lxc exec $NAME -- reboot
3333 sleep 20
3434
7777NAME=machine-$RANDOM
7878create_machine $NAME $PROXY
7979# use 'script' for required tty: https://github.com/lxc/lxd/issues/1724#issuecomment-194416774
80- lxc exec $NAME -- script -e -c " UPGRADE_MICROK8S_FROM=${FROM_CHANNEL} UPGRADE_MICROK8S_TO=${TO_CHANNEL} pytest -s /var/tmp /tests/test-upgrade.py"
80+ lxc exec $NAME -- script -e -c " UPGRADE_MICROK8S_FROM=${FROM_CHANNEL} UPGRADE_MICROK8S_TO=${TO_CHANNEL} pytest -s /root /tests/test-upgrade.py"
8181lxc delete $NAME --force
8282
8383# Test upgrade-path
@@ -87,9 +87,9 @@ create_machine $NAME $PROXY
8787if [[ ${TO_CHANNEL} =~ /.* /microk8s.* snap ]]
8888then
8989 lxc file push ${TO_CHANNEL} $NAME /tmp/microk8s_latest_amd64.snap
90- lxc exec $NAME -- script -e -c " UPGRADE_MICROK8S_FROM=${FROM_CHANNEL} UPGRADE_MICROK8S_TO=/tmp/microk8s_latest_amd64.snap pytest -s /var/tmp /tests/test-upgrade-path.py"
90+ lxc exec $NAME -- script -e -c " UPGRADE_MICROK8S_FROM=${FROM_CHANNEL} UPGRADE_MICROK8S_TO=/tmp/microk8s_latest_amd64.snap pytest -s /root /tests/test-upgrade-path.py"
9191else
92- lxc exec $NAME -- script -e -c " UPGRADE_MICROK8S_FROM=${FROM_CHANNEL} UPGRADE_MICROK8S_TO=${TO_CHANNEL} pytest -s /var/tmp /tests/test-upgrade-path.py"
92+ lxc exec $NAME -- script -e -c " UPGRADE_MICROK8S_FROM=${FROM_CHANNEL} UPGRADE_MICROK8S_TO=${TO_CHANNEL} pytest -s /root /tests/test-upgrade-path.py"
9393fi
9494lxc delete $NAME --force
9595
103103else
104104 lxc exec $NAME -- snap install microk8s --channel=${TO_CHANNEL} --classic
105105fi
106- lxc exec $NAME -- /var/tmp /tests/smoke-test.sh
106+ lxc exec $NAME -- /root /tests/smoke-test.sh
107107# use 'script' for required tty: https://github.com/lxc/lxd/issues/1724#issuecomment-194416774
108108lxc exec $NAME -- script -e -c " pytest -s /var/snap/microk8s/common/addons/core/tests/test-addons.py"
109109lxc exec $NAME -- microk8s enable community
0 commit comments