From 11fcc68c8a9d3021b6794816a5aa8ec407358cfc Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Wed, 19 Jun 2024 16:27:31 -0400 Subject: [PATCH] integration/test_client: skip password auth if not supported by LXD Signed-off-by: Simon Deziel --- integration/test_client.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/integration/test_client.py b/integration/test_client.py index e95c30e6..a014a555 100644 --- a/integration/test_client.py +++ b/integration/test_client.py @@ -21,6 +21,9 @@ class TestClient(IntegrationTestCase): """Tests for `Client`.""" def test_authenticate(self): + if self.client.has_api_extension("explicit_trust_token"): + self.skipTest("Required LXD support for password authentication not available!") + client = pylxd.Client("https://127.0.0.1:8443/") self.assertFalse(client.trusted) @@ -30,6 +33,9 @@ def test_authenticate(self): self.assertTrue(client.trusted) def test_authenticate_with_project(self): + if self.client.has_api_extension("explicit_trust_token"): + self.skipTest("Required LXD support for password authentication not available!") + try: client = pylxd.Client("https://127.0.0.1:8443/", project="test-project") except exceptions.ClientConnectionFailed as e: