mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
ci: Add test for apt helpers
This commit is contained in:
parent
ba489bfc27
commit
3eb69224aa
1 changed files with 22 additions and 0 deletions
22
tests/test_helpers.d/ynhtest_apt.sh
Normal file
22
tests/test_helpers.d/ynhtest_apt.sh
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
ynhtest_apt_install_apt_deps_regular() {
|
||||||
|
|
||||||
|
dpkg --list | grep -q "ii *$app-ynh-deps" && apt remove $app-ynh-deps --assume-yes || true
|
||||||
|
dpkg --list | grep -q 'ii *nyancat' && apt remove nyancat --assume-yes || true
|
||||||
|
dpkg --list | grep -q 'ii *sl' && apt remove sl --assume-yes || true
|
||||||
|
|
||||||
|
! ynh_package_is_installed "$app-ynh-deps"
|
||||||
|
! ynh_package_is_installed "nyancat"
|
||||||
|
! ynh_package_is_installed "sl"
|
||||||
|
|
||||||
|
ynh_install_app_dependencies "nyancat sl"
|
||||||
|
|
||||||
|
ynh_package_is_installed "$app-ynh-deps"
|
||||||
|
ynh_package_is_installed "nyancat"
|
||||||
|
ynh_package_is_installed "sl"
|
||||||
|
|
||||||
|
ynh_remove_app_dependencies
|
||||||
|
|
||||||
|
! ynh_package_is_installed "$app-ynh-deps"
|
||||||
|
! ynh_package_is_installed "nyancat"
|
||||||
|
! ynh_package_is_installed "sl"
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue