<?xml version="1.0" encoding="utf-8"?><testsuites name="pytest tests"><testsuite name="pytest" errors="0" failures="1" skipped="0" tests="22" time="508.848" timestamp="2026-09-06T01:36:06.613690+00:00" hostname="maas-group-test-nn4qh-e2e-maas-openshift-pod"><testcase classname="tests.test_api_keys.TestAPIKeySubscriptionPhases" name="test_create_key_for_pending_subscription" time="83.708" /><testcase classname="tests.test_api_keys.TestAPIKeySubscriptionPhases" name="test_reject_key_for_unreconciled_subscription" time="14.992" /><testcase classname="tests.test_negative_security.TestAuthPolicyRemoval" name="test_authpolicy_deletion_revokes_access" time="7.295" /><testcase classname="tests.test_subscription.TestSubscriptionEnforcement" name="test_rate_limit_exhaustion_gets_429" time="7.213" /><testcase classname="tests.test_subscription.TestSubscriptionEnforcement" name="test_models_endpoint_exempt_from_rate_limiting" time="12.950" /><testcase classname="tests.test_subscription.TestMultipleSubscriptionsPerModel" name="test_user_in_one_of_two_subscriptions_gets_200" time="0.537" /><testcase classname="tests.test_subscription.TestMultipleAuthPoliciesPerModel" name="test_delete_one_auth_policy_other_still_works" time="0.863" /><testcase classname="tests.test_subscription.TestCascadeDeletion" name="test_delete_subscription_rebuilds_trlp" time="0.636" /><testcase classname="tests.test_subscription.TestCascadeDeletion" name="test_trlp_persists_during_multi_subscription_deletion" time="5.985" /><testcase classname="tests.test_subscription.TestCascadeDeletion" name="test_delete_last_subscription_denies_access" time="2.857" /><testcase classname="tests.test_subscription.TestE2ESubscriptionFlow" name="test_e2e_with_access_but_no_subscription_gets_403" time="3.912" /><testcase classname="tests.test_subscription.TestE2ESubscriptionFlow" name="test_e2e_single_subscription_auto_selects" time="6.180" /><testcase classname="tests.test_subscription.TestE2ESubscriptionFlow" name="test_e2e_group_based_auth_but_no_subscription_gets_403" time="5.719" /><testcase classname="tests.test_subscription.TestStatusReporting" name="test_subscription_degraded_trlp_blocks_inference" time="84.333" /><testcase classname="tests.test_models_endpoint.TestModelsEndpoint" name="test_single_subscription_auto_select" time="4.633" /><testcase classname="tests.test_models_endpoint.TestModelsEndpoint" name="test_different_modelrefs_same_model_id" time="42.260" /><testcase classname="tests.test_models_endpoint.TestModelsEndpoint" name="test_empty_model_list" time="3.297" /><testcase classname="tests.test_models_endpoint.TestModelsEndpoint" name="test_central_models_endpoint_exempt_from_rate_limiting" time="9.678" /><testcase classname="tests.test_tenant.TestTenantLifecycle" name="test_payload_processing_deployed_with_active_tenant" time="186.550"><failure message="AssertionError: maas-api Deployment replicas did not match MaasTenantConfig override within timeout; expected replicas=2, last observed=1&#10;assert None is not None">self = &lt;test_tenant.TestTenantLifecycle object at 0x7fe8fe45e730&gt;

    @pytest.mark.serial
    def test_payload_processing_deployed_with_active_tenant(self):
        """Active MaasTenantConfig should reconcile tenant platform workloads.
    
        Verifies payload-processing exists and that spec.maasApi replicas/resources
        overrides are applied to the default maas-api Deployment (then restored).
        """
        st = _wait_tenant_ready()
        assert st is not None, "MaasTenantConfig not Ready; skip workload checks."
        phase = st.get("phase")
        if phase not in ("Active", "Degraded"):
            pytest.skip(f"Tenant phase {phase!r}; workload checks require Active or Degraded")
    
        deployments_ready = any(
            cond.get("type") == "DeploymentsAvailable" and cond.get("status") == "True"
            for cond in (st.get("conditions") or [])
        )
        if not deployments_ready:
            pytest.skip("Tenant DeploymentsAvailable is not True; skipping workload checks")
    
        result = _oc_run(
            [
                "get",
                "deployment",
                "payload-processing",
                "-n",
                GATEWAY_NAMESPACE,
                "-o",
                "name",
            ]
        )
        if result.returncode != 0:
            if _oc_output_not_found(result):
                pytest.skip(
                    f"payload-processing deployment not found in namespace {GATEWAY_NAMESPACE!r}; "
                    "skipping (optional workload in some CI or partial installs)."
                )
            combined = (result.stderr or "") + (result.stdout or "")
            pytest.fail(
                f"`oc get deployment payload-processing -n {GATEWAY_NAMESPACE}` failed: "
                f"{combined.strip()}"
            )
        assert result.stdout.strip(), "payload-processing deployment get succeeded but returned no name"
    
        maas_api_result = _oc_run(
            [
                "get",
                "deployment",
                "maas-api",
                "-n",
                MAAS_API_DEPLOYMENT_NAMESPACE,
                "-o",
                "name",
            ]
        )
        if maas_api_result.returncode != 0:
            if _oc_output_not_found(maas_api_result):
                pytest.skip(
                    f"maas-api deployment not found in namespace {MAAS_API_DEPLOYMENT_NAMESPACE!r}; "
                    "skipping maasApi override check."
                )
            combined = (maas_api_result.stderr or "") + (maas_api_result.stdout or "")
            pytest.fail(
                f"`oc get deployment maas-api -n {MAAS_API_DEPLOYMENT_NAMESPACE}` failed: "
                f"{combined.strip()}"
            )
    
        baseline = _tenant_doc()
        original_spec = copy.deepcopy(baseline.get("spec") or {})
        patch = {
            "spec": {
                "maasApi": {
                    "replicas": _MAAS_API_OVERRIDE_REPLICAS,
                    "resources": {
                        "requests": _MAAS_API_OVERRIDE_REQUESTS,
                        "limits": _MAAS_API_OVERRIDE_LIMITS,
                    },
                }
            }
        }
        patch_result = _oc_run(
            [
                "patch",
                "maastenantconfig",
                TENANT_NAME,
                "-n",
                _ns(),
                "--type=merge",
                "-p",
                json.dumps(patch),
            ]
        )
        if patch_result.returncode != 0:
            combined = (patch_result.stderr or "") + (patch_result.stdout or "")
            if "maasApi" in combined or "unknown field" in combined.lower():
                pytest.skip(
                    "MaasTenantConfig spec.maasApi not supported by installed CRD/controller; "
                    f"skipping maasApi override check: {combined.strip()}"
                )
            pytest.fail(
                f"`oc patch maastenantconfig/{TENANT_NAME}` failed: {combined.strip()}"
            )
    
        try:
            matched_replicas = _wait_maas_api_replicas(
                MAAS_API_DEPLOYMENT_NAMESPACE,
                _MAAS_API_OVERRIDE_REPLICAS,
            )
&gt;           assert matched_replicas is not None, (
                "maas-api Deployment replicas did not match MaasTenantConfig override within timeout; "
                f"expected replicas={_MAAS_API_OVERRIDE_REPLICAS}, "
                f"last observed={_maas_api_replica_count(MAAS_API_DEPLOYMENT_NAMESPACE)!r}"
            )
E           AssertionError: maas-api Deployment replicas did not match MaasTenantConfig override within timeout; expected replicas=2, last observed=1
E           assert None is not None

test/e2e/tests/test_tenant.py:325: AssertionError</failure></testcase><testcase classname="tests.test_embedding_inference.TestEmbeddingGovernance" name="test_embedding_default_deny_403" time="0.175" /><testcase classname="tests.test_embedding_inference.TestEmbeddingGovernance" name="test_embedding_trlp_429" time="11.088" /><testcase classname="tests.test_embedding_inference.TestEmbeddingGovernance" name="test_embedding_with_governance_200" time="12.705" /></testsuite></testsuites>