test-nspawn: make run-tests idempotent (#54189)
Without that it's difficult to test it by running it multiple times.
This commit is contained in:
parent
7453036aba
commit
e87082983b
|
@ -13,9 +13,9 @@ elif [ $1 = 'run-tests' ]
|
|||
then
|
||||
apt update
|
||||
apt install -y wget ca-certificates gnupg2 git ansible postgresql sudo python python3
|
||||
adduser --disabled-password --gecos "" testuser
|
||||
id testuser || adduser --disabled-password --gecos "" testuser
|
||||
usermod -a -G sudo testuser
|
||||
echo 'testuser ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
grep -q testuser /etc/sudoers || echo 'testuser ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
chown -R testuser /opt/publik-devinst
|
||||
/usr/bin/wget https://deb.entrouvert.org/entrouvert.gpg
|
||||
apt-key add entrouvert.gpg
|
||||
|
|
Loading…
Reference in New Issue