From fe55af6adf993ec2b3b78e6e67dbbc68cccf953d Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 23 Jan 2024 10:30:29 +0100 Subject: [PATCH] Add a test for connection XO to hosts Signed-off-by: Benjamin Reis --- tests/misc/test_xo_connection.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/misc/test_xo_connection.py diff --git a/tests/misc/test_xo_connection.py b/tests/misc/test_xo_connection.py new file mode 100644 index 000000000..01069f2c1 --- /dev/null +++ b/tests/misc/test_xo_connection.py @@ -0,0 +1,12 @@ +import logging + +# These test is meant to test an XO connection. +# +# Requirements: +# - an XCP-ng host >= 8.2 with latest updates. +# - An XOA registered through `xo-cli` + +def test_xo_connection(hosts_with_xo): + for h in hosts_with_xo: + logging.debug(f"Testing connection for host: {h.hostname_or_ip}") + assert h.xo_get_server_id() is not None