From dd383d763f573279f58c6d1fba778ad68743fb70 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 4 Sep 2022 17:58:30 +0200 Subject: [PATCH] Revert "tests: remove duplicate healthchecks, bump grafana and dex" This reverts commit df9d8e9d253d48f0556b739210c327914e5261d3. --- tests/e2e/test_provider_oauth2_github.py | 2 +- tests/e2e/test_provider_oauth2_grafana.py | 2 +- tests/e2e/test_provider_oauth2_oidc.py | 6 ++++++ tests/e2e/test_provider_oauth2_oidc_implicit.py | 6 ++++++ tests/e2e/test_provider_saml.py | 6 ++++++ tests/e2e/test_source_oauth.py | 2 +- 6 files changed, 21 insertions(+), 3 deletions(-) diff --git a/tests/e2e/test_provider_oauth2_github.py b/tests/e2e/test_provider_oauth2_github.py index 05022fff5..f24797b90 100644 --- a/tests/e2e/test_provider_oauth2_github.py +++ b/tests/e2e/test_provider_oauth2_github.py @@ -30,7 +30,7 @@ class TestProviderOAuth2Github(SeleniumTestCase): def get_container_specs(self) -> Optional[dict[str, Any]]: """Setup client grafana container which we test OAuth against""" return { - "image": "grafana/grafana:9.1.2", + "image": "grafana/grafana:7.1.0", "detach": True, "network_mode": "host", "auto_remove": True, diff --git a/tests/e2e/test_provider_oauth2_grafana.py b/tests/e2e/test_provider_oauth2_grafana.py index 17fd9d51e..776a31363 100644 --- a/tests/e2e/test_provider_oauth2_grafana.py +++ b/tests/e2e/test_provider_oauth2_grafana.py @@ -36,7 +36,7 @@ class TestProviderOAuth2OAuth(SeleniumTestCase): def get_container_specs(self) -> Optional[dict[str, Any]]: return { - "image": "grafana/grafana:9.1.2", + "image": "grafana/grafana:7.1.0", "detach": True, "network_mode": "host", "auto_remove": True, diff --git a/tests/e2e/test_provider_oauth2_oidc.py b/tests/e2e/test_provider_oauth2_oidc.py index 5f53a19c2..f43e8e129 100644 --- a/tests/e2e/test_provider_oauth2_oidc.py +++ b/tests/e2e/test_provider_oauth2_oidc.py @@ -6,6 +6,7 @@ from unittest.case import skipUnless from docker import DockerClient, from_env from docker.models.containers import Container +from docker.types import Healthcheck from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as ec @@ -44,6 +45,11 @@ class TestProviderOAuth2OIDC(SeleniumTestCase): detach=True, network_mode="host", auto_remove=True, + healthcheck=Healthcheck( + test=["CMD", "wget", "--spider", "http://localhost:9009/health"], + interval=5 * 100 * 1000000, + start_period=1 * 100 * 1000000, + ), environment={ "OIDC_CLIENT_ID": self.client_id, "OIDC_CLIENT_SECRET": self.client_secret, diff --git a/tests/e2e/test_provider_oauth2_oidc_implicit.py b/tests/e2e/test_provider_oauth2_oidc_implicit.py index e551999a4..44e7c8571 100644 --- a/tests/e2e/test_provider_oauth2_oidc_implicit.py +++ b/tests/e2e/test_provider_oauth2_oidc_implicit.py @@ -6,6 +6,7 @@ from unittest.case import skipUnless from docker import DockerClient, from_env from docker.models.containers import Container +from docker.types import Healthcheck from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as ec @@ -44,6 +45,11 @@ class TestProviderOAuth2OIDCImplicit(SeleniumTestCase): detach=True, network_mode="host", auto_remove=True, + healthcheck=Healthcheck( + test=["CMD", "wget", "--spider", "http://localhost:9009/health"], + interval=5 * 100 * 1000000, + start_period=1 * 100 * 1000000, + ), environment={ "OIDC_CLIENT_ID": self.client_id, "OIDC_CLIENT_SECRET": self.client_secret, diff --git a/tests/e2e/test_provider_saml.py b/tests/e2e/test_provider_saml.py index 9a4e3e1bc..67f8c0cb6 100644 --- a/tests/e2e/test_provider_saml.py +++ b/tests/e2e/test_provider_saml.py @@ -6,6 +6,7 @@ from unittest.case import skipUnless from docker import DockerClient, from_env from docker.models.containers import Container +from docker.types import Healthcheck from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as ec @@ -43,6 +44,11 @@ class TestProviderSAML(SeleniumTestCase): detach=True, network_mode="host", auto_remove=True, + healthcheck=Healthcheck( + test=["CMD", "wget", "--spider", "http://localhost:9009/health"], + interval=5 * 100 * 1000000, + start_period=1 * 100 * 1000000, + ), environment={ "SP_ENTITY_ID": provider.issuer, "SP_SSO_BINDING": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", diff --git a/tests/e2e/test_source_oauth.py b/tests/e2e/test_source_oauth.py index bd85baa39..5848eb0b1 100644 --- a/tests/e2e/test_source_oauth.py +++ b/tests/e2e/test_source_oauth.py @@ -106,7 +106,7 @@ class TestSourceOAuth2(SeleniumTestCase): def get_container_specs(self) -> Optional[dict[str, Any]]: return { - "image": "ghcr.io/dexidp/dex:v2.33.0", + "image": "ghcr.io/dexidp/dex:v2.28.1", "detach": True, "network_mode": "host", "auto_remove": True,