mirror of
https://github.com/element-hq/ess-helm.git
synced 2026-12-03 15:22:26 -08:00
add markers in the deployment and test their values
This commit is contained in:
2 files changed
+27
No files matched your search
@@ -3,6 +3,7 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import pytest
|
||||
from lightkube.resources.core_v1 import Secret
|
||||
|
||||
from .fixtures import ESSData
|
||||
from .lib.utils import aiohttp_post_json, value_file_has
|
||||
@@ -22,3 +23,15 @@ async def test_matrix_authentication_service_graphql_endpoint(ingress_ready, gen
|
||||
assert "errors" not in json_content or len(json_content["errors"]) == 0, json_content
|
||||
# When not authenticated, the userByUsername will return an empty result whatever the username queried
|
||||
assert json_content["data"] == {"userByUsername": None}
|
||||
|
||||
|
||||
@pytest.mark.skipif(value_file_has("matrixAuthenticationService.enabled", False), reason="MAS not deployed")
|
||||
@pytest.mark.asyncio_cooperative
|
||||
async def test_matrix_authentication_service_marker_delegated_auth(kube_client, generated_data: ESSData, ssl_context):
|
||||
secret = await kube_client.get(
|
||||
Secret,
|
||||
namespace=generated_data.ess_namespace,
|
||||
name="{generated_data.name}-generated-secret",
|
||||
)
|
||||
assert secret.data.get("MATRIX_STACK_MSC3861") is not None
|
||||
assert secret.data.get("MATRIX_STACK_MSC3861") == b"delegated_auth"
|
||||
@@ -6,6 +6,7 @@ import hashlib
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from lightkube.resources.core_v1 import Secret
|
||||
|
||||
from .fixtures import ESSData
|
||||
from .lib.synapse import assert_downloaded_content, download_media, upload_media
|
||||
@@ -114,3 +115,16 @@ async def test_rendezvous_cors_headers_are_only_set_with_mas(ingress_ready, gene
|
||||
assert "Synapse-Trace-Id" in response.headers["Access-Control-Expose-Headers"]
|
||||
assert "Server" in response.headers["Access-Control-Expose-Headers"]
|
||||
assert ("ETag" in response.headers["Access-Control-Expose-Headers"]) == supports_qr_code_login
|
||||
|
||||
|
||||
@pytest.mark.skipif(value_file_has("synapse.enabled", False), reason="Synapse not deployed")
|
||||
@pytest.mark.skipif(value_file_has("matrixAuthenticationService.enabled", True), reason="MAS is deployed")
|
||||
@pytest.mark.asyncio_cooperative
|
||||
async def test_synapse_service_marker_legacy_auth(kube_client, generated_data: ESSData, ssl_context):
|
||||
secret = await kube_client.get(
|
||||
Secret,
|
||||
namespace=generated_data.ess_namespace,
|
||||
name="{generated_data.name}-generated-secret",
|
||||
)
|
||||
assert secret.data.get("MATRIX_STACK_MSC3861") is not None
|
||||
assert secret.data.get("MATRIX_STACK_MSC3861") == b"legacy_auth"
|
||||
Reference in new issue
Block a user