Merge pull request #1887 from YunoHost/fix_yarn_test

Test resources with influxdb instead of yarn that is installed by default now
This commit is contained in:
Alexandre Aubin 2024-06-30 17:42:23 +02:00 committed by GitHub
commit b523089e48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,7 +56,7 @@ def clean():
os.system("rm -rf /etc/yunohost/apps/testapp")
os.system("rm -rf /var/www/testapp")
os.system("rm -rf /home/yunohost.app/testapp")
os.system("apt remove lolcat sl nyancat yarn >/dev/null 2>/dev/null")
os.system("apt remove lolcat sl nyancat influxdb2 >/dev/null 2>/dev/null")
os.system("userdel testapp 2>/dev/null")
for p in user_permission_list()["permissions"]:
@ -295,17 +295,17 @@ def test_resource_apt():
conf = {
"packages": "nyancat, sl",
"extras": {
"yarn": {
"repo": "deb https://dl.yarnpkg.com/debian/ stable main",
"key": "https://dl.yarnpkg.com/debian/pubkey.gpg",
"packages": "yarn",
"influxdb": {
"repo": "deb https://repos.influxdata.com/debian stable main",
"key": "https://repos.influxdata.com/influxdata-archive_compat.key",
"packages": "influxdb2",
}
},
}
assert os.system("dpkg --list | grep -q 'ii *nyancat '") != 0
assert os.system("dpkg --list | grep -q 'ii *sl '") != 0
assert os.system("dpkg --list | grep -q 'ii *yarn '") != 0
assert os.system("dpkg --list | grep -q 'ii *influxdb2 '") != 0
assert os.system("dpkg --list | grep -q 'ii *lolcat '") != 0
assert os.system("dpkg --list | grep -q 'ii *testapp-ynh-deps '") != 0
@ -313,7 +313,7 @@ def test_resource_apt():
assert os.system("dpkg --list | grep -q 'ii *nyancat '") == 0
assert os.system("dpkg --list | grep -q 'ii *sl '") == 0
assert os.system("dpkg --list | grep -q 'ii *yarn '") == 0
assert os.system("dpkg --list | grep -q 'ii *influxdb2 '") == 0
assert (
os.system("dpkg --list | grep -q 'ii *lolcat '") != 0
) # Lolcat shouldnt be installed yet
@ -324,7 +324,7 @@ def test_resource_apt():
assert os.system("dpkg --list | grep -q 'ii *nyancat '") == 0
assert os.system("dpkg --list | grep -q 'ii *sl '") == 0
assert os.system("dpkg --list | grep -q 'ii *yarn '") == 0
assert os.system("dpkg --list | grep -q 'ii *influxdb2 '") == 0
assert os.system("dpkg --list | grep -q 'ii *lolcat '") == 0
assert os.system("dpkg --list | grep -q 'ii *testapp-ynh-deps '") == 0
@ -332,7 +332,7 @@ def test_resource_apt():
assert os.system("dpkg --list | grep -q 'ii *nyancat '") != 0
assert os.system("dpkg --list | grep -q 'ii *sl '") != 0
assert os.system("dpkg --list | grep -q 'ii *yarn '") != 0
assert os.system("dpkg --list | grep -q 'ii *influxdb2 '") != 0
assert os.system("dpkg --list | grep -q 'ii *lolcat '") != 0
assert os.system("dpkg --list | grep -q 'ii *testapp-ynh-deps '") != 0