test-in-lxd: remove privileged container usage (#974)
* test-in-lxd: remove privileged container usage * Don't assume certain home directory name * Try enabling groovy
This commit is contained in:
parent
15f995096e
commit
1d42f897a1
|
@ -10,6 +10,7 @@ jobs:
|
|||
image:
|
||||
- ubuntu-daily:bionic
|
||||
- ubuntu-daily:focal
|
||||
- ubuntu-daily:groovy
|
||||
- ubuntu-daily:hirsute
|
||||
- ubuntu-daily:impish
|
||||
steps:
|
||||
|
|
|
@ -5,8 +5,15 @@ SCRIPT=$2
|
|||
|
||||
lxd init --auto
|
||||
|
||||
lxc launch $IMAGE tester -c security.privileged=true
|
||||
lxc launch $IMAGE tester
|
||||
lxc config device add tester code disk source=`pwd` path=/subiquity
|
||||
# copy is allowed to fail, in case the subiquity directory being tested
|
||||
# includes some uncopyable stuff
|
||||
lxc exec tester -- sh -ec "
|
||||
cd ~
|
||||
sudo cp -a /subiquity . || true
|
||||
[ -d ~/subiquity ]
|
||||
"
|
||||
|
||||
attempts=0
|
||||
while ! lxc file pull tester/etc/resolv.conf - 2> /dev/null | grep -q ^nameserver; do
|
||||
|
@ -32,4 +39,7 @@ then
|
|||
done
|
||||
fi
|
||||
|
||||
lxc exec tester -- sh -c "cd /subiquity && ./scripts/installdeps.sh && $SCRIPT"
|
||||
lxc exec tester -- sh -ec "
|
||||
cd ~/subiquity
|
||||
./scripts/installdeps.sh
|
||||
$SCRIPT"
|
||||
|
|
Loading…
Reference in New Issue