diff --git a/tests/e2e/test_provider_proxy.py b/tests/e2e/test_provider_proxy.py index daec31500..1e5554eaf 100644 --- a/tests/e2e/test_provider_proxy.py +++ b/tests/e2e/test_provider_proxy.py @@ -21,7 +21,7 @@ from authentik.outposts.models import ( OutpostType, ) from authentik.providers.proxy.models import ProxyProvider -from tests.e2e.utils import SeleniumTestCase, retry +from tests.e2e.utils import SeleniumTestCase, apply_migration, object_manager, retry @skipUnless(platform.startswith("linux"), "requires local docker") @@ -58,6 +58,11 @@ class TestProviderProxy(SeleniumTestCase): return container @retry() + @apply_migration("authentik_core", "0003_default_user") + @apply_migration("authentik_flows", "0008_default_flows") + @apply_migration("authentik_flows", "0010_provider_flows") + @apply_migration("authentik_crypto", "0002_create_self_signed_kp") + @object_manager def test_proxy_simple(self): """Test simple outpost setup with single provider""" proxy: ProxyProvider = ProxyProvider.objects.create( @@ -105,6 +110,11 @@ class TestProviderProxyConnect(ChannelsLiveServerTestCase): """Test Proxy connectivity over websockets""" @retry() + @apply_migration("authentik_core", "0003_default_user") + @apply_migration("authentik_flows", "0008_default_flows") + @apply_migration("authentik_flows", "0010_provider_flows") + @apply_migration("authentik_crypto", "0002_create_self_signed_kp") + @object_manager def test_proxy_connectivity(self): """Test proxy connectivity over websocket""" AuthentikOutpostConfig.init_local_connection() diff --git a/tests/e2e/test_provider_saml.py b/tests/e2e/test_provider_saml.py index 40b23ef0b..df6dac35e 100644 --- a/tests/e2e/test_provider_saml.py +++ b/tests/e2e/test_provider_saml.py @@ -21,7 +21,13 @@ from authentik.providers.saml.models import ( SAMLPropertyMapping, SAMLProvider, ) -from tests.e2e.utils import USER, SeleniumTestCase, retry +from tests.e2e.utils import ( + USER, + SeleniumTestCase, + apply_migration, + object_manager, + retry, +) LOGGER = get_logger() @@ -65,6 +71,11 @@ class TestProviderSAML(SeleniumTestCase): sleep(1) @retry() + @apply_migration("authentik_core", "0003_default_user") + @apply_migration("authentik_flows", "0008_default_flows") + @apply_migration("authentik_flows", "0010_provider_flows") + @apply_migration("authentik_crypto", "0002_create_self_signed_kp") + @object_manager def test_sp_initiated_implicit(self): """test SAML Provider flow SP-initiated flow (implicit consent)""" # Bootstrap all needed objects @@ -124,6 +135,11 @@ class TestProviderSAML(SeleniumTestCase): ) @retry() + @apply_migration("authentik_core", "0003_default_user") + @apply_migration("authentik_flows", "0008_default_flows") + @apply_migration("authentik_flows", "0010_provider_flows") + @apply_migration("authentik_crypto", "0002_create_self_signed_kp") + @object_manager def test_sp_initiated_explicit(self): """test SAML Provider flow SP-initiated flow (explicit consent)""" # Bootstrap all needed objects @@ -200,6 +216,11 @@ class TestProviderSAML(SeleniumTestCase): ) @retry() + @apply_migration("authentik_core", "0003_default_user") + @apply_migration("authentik_flows", "0008_default_flows") + @apply_migration("authentik_flows", "0010_provider_flows") + @apply_migration("authentik_crypto", "0002_create_self_signed_kp") + @object_manager def test_idp_initiated_implicit(self): """test SAML Provider flow IdP-initiated flow (implicit consent)""" # Bootstrap all needed objects @@ -265,6 +286,11 @@ class TestProviderSAML(SeleniumTestCase): ) @retry() + @apply_migration("authentik_core", "0003_default_user") + @apply_migration("authentik_flows", "0008_default_flows") + @apply_migration("authentik_flows", "0010_provider_flows") + @apply_migration("authentik_crypto", "0002_create_self_signed_kp") + @object_manager def test_sp_initiated_denied(self): """test SAML Provider flow SP-initiated flow (Policy denies access)""" # Bootstrap all needed objects