feat: Add pre-production deployment stage with E2E tests, a dedicated environment file, and update production deployment dependency. #30

Open
kovagoadi wants to merge 14 commits from test_preprod into main
Showing only changes of commit 1c9be2d57d - Show all commits

View File

@@ -88,7 +88,7 @@ def mock_webserver():
# We need to recreate the container to pick up extra_hosts changes # We need to recreate the container to pick up extra_hosts changes
try: try:
subprocess.run(["docker-compose", "--env-file", "dev.env", "up", "-d", "--force-recreate", "--no-deps", "traefik"], env=env, check=True, capture_output=True, text=True) subprocess.run(["docker-compose", "--env-file", "preprod.env", "up", "-d", "--force-recreate", "--no-deps", "traefik"], env=env, check=True, capture_output=True, text=True)
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
print(f"Docker Compose STDOUT: {e.stdout}") print(f"Docker Compose STDOUT: {e.stdout}")
print(f"Docker Compose STDERR: {e.stderr}") print(f"Docker Compose STDERR: {e.stderr}")
@@ -104,7 +104,7 @@ def mock_webserver():
subprocess.run(["docker", "stop", mock["name"]], capture_output=True) subprocess.run(["docker", "stop", mock["name"]], capture_output=True)
# Restore Traefik to default (optional) # Restore Traefik to default (optional)
subprocess.run(["docker-compose", "--env-file", "dev.env", "up", "-d", "--force-recreate", "--no-deps", "traefik"], check=True) subprocess.run(["docker-compose", "--env-file", "preprod.env", "up", "-d", "--force-recreate", "--no-deps", "traefik"], check=True)
def test_whoami_http_reachable(): def test_whoami_http_reachable():
"""Verify that the whoami service is reachable via HTTP.""" """Verify that the whoami service is reachable via HTTP."""