🍽 Fork YunoHost — snapshot mangé par la machine à tsoins
Upstream: https://github.com/YunoHost/yunohost @ 3a5f8bac8301c450897b96cbd43a4c7d3ba750fb But (José) : transformer tout le code en bions + ploxions du xerboxion. La carte de digestion vit au labo : /yunohost-digest.json
This commit is contained in:
22
tests/test_helpers.v2.d/ynhtest_network.sh
Normal file
22
tests/test_helpers.v2.d/ynhtest_network.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
ynhtest_port_80_aint_available() {
|
||||
! ynh_port_available 80
|
||||
}
|
||||
|
||||
ynhtest_port_12345_is_available() {
|
||||
ynh_port_available 12345
|
||||
}
|
||||
|
||||
ynhtest_port_12345_is_booked_by_other_app() {
|
||||
|
||||
ynh_port_available 12345
|
||||
ynh_port_available 12346
|
||||
|
||||
mkdir -p /etc/yunohost/apps/block_port/
|
||||
echo "port: '12345'" > /etc/yunohost/apps/block_port/settings.yml
|
||||
! ynh_port_available 12345
|
||||
|
||||
echo "other_port: '12346'" > /etc/yunohost/apps/block_port/settings.yml
|
||||
! ynh_port_available 12346
|
||||
|
||||
rm -rf /etc/yunohost/apps/block_port
|
||||
}
|
||||
Reference in New Issue
Block a user