From b7d7588f46b5f2cf88ea119f8cd3e0d305a0c738 Mon Sep 17 00:00:00 2001 From: Luciano Lo Giudice Date: Tue, 5 Apr 2022 14:50:15 -0300 Subject: [PATCH] Test SAML redirect and presence of metadata --- zaza/openstack/charm_tests/ceph/dashboard/tests.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/zaza/openstack/charm_tests/ceph/dashboard/tests.py b/zaza/openstack/charm_tests/ceph/dashboard/tests.py index d640ad7..4e0e5c2 100644 --- a/zaza/openstack/charm_tests/ceph/dashboard/tests.py +++ b/zaza/openstack/charm_tests/ceph/dashboard/tests.py @@ -243,4 +243,11 @@ class CephDashboardTest(test_utils.BaseCharmTest): 'saml-idp-metadata': 'file://{}'.format(tmp.name), } ) - self.access_dashboard(url) + + # Login must be redirected. + resp = requests.get(url + '/auth/saml2/login') + self.assertTrue(resp.is_redirect) + + # Check that metadata is present. + resp = requests.get(url + '/auth/saml2/metadata') + self.assertEqual(resp.status_code, requests.code.ok)