tests: tmp tweaks to adapt for removed deprecated features

This commit is contained in:
Alexandre Aubin 2023-06-13 21:30:20 +02:00
parent b4dcd0fb22
commit 81b96ad6d4
2 changed files with 7 additions and 4 deletions

View file

@ -439,7 +439,8 @@ def test_backup_using_copy_method():
# App restore #
#
# FIXME : switch to a backup from 11.x
@pytest.mark.skip
@pytest.mark.with_wordpress_archive_from_4p2
@pytest.mark.with_custom_domain("yolo.test")
def test_restore_app_wordpress_from_Ynh4p2():
@ -504,6 +505,8 @@ def test_restore_app_not_in_backup(mocker):
assert not _is_installed("yoloswag")
# FIXME : switch to a backup from 11.x
@pytest.mark.skip
@pytest.mark.with_wordpress_archive_from_4p2
@pytest.mark.with_custom_domain("yolo.test")
def test_restore_app_already_installed(mocker):

View file

@ -1131,7 +1131,7 @@ def test_permission_app_propagation_on_ssowat():
def test_permission_legacy_app_propagation_on_ssowat():
app_install(
os.path.join(get_test_apps_dir(), "legacy_app_ynh"),
args="domain=%s&domain_2=%s&path=%s&is_public=1"
args="domain=%s&domain_2=%s&path=%s&is_public=0"
% (maindomain, other_domains[0], "/legacy"),
force=True,
)
@ -1139,12 +1139,12 @@ def test_permission_legacy_app_propagation_on_ssowat():
# App is configured as public by default using the legacy unprotected_uri mechanics
# It should automatically be migrated during the install
res = user_permission_list(full=True)["permissions"]
assert "visitors" in res["legacy_app.main"]["allowed"]
assert "visitors" not in res["legacy_app.main"]["allowed"]
assert "all_users" in res["legacy_app.main"]["allowed"]
app_webroot = "https://%s/legacy" % maindomain
assert can_access_webpage(app_webroot, logged_as=None)
assert not can_access_webpage(app_webroot, logged_as=None)
assert can_access_webpage(app_webroot, logged_as="alice")
# Try to update the permission and check that permissions are still consistent