From 3482a5db5340fd1d3a8a275d9fac3f1081b67fc4 Mon Sep 17 00:00:00 2001 From: Dawei Pang Date: Tue, 10 Sep 2024 14:01:11 +0800 Subject: [PATCH] Detect pacemaker version, conditionally run test_check_cluster_configuration --- e2e_test/hawk_test.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/e2e_test/hawk_test.py b/e2e_test/hawk_test.py index f2cf831d..fb541a62 100755 --- a/e2e_test/hawk_test.py +++ b/e2e_test/hawk_test.py @@ -112,6 +112,10 @@ def main(): # Get version from /etc/os-release test_version = ssh.ssh.exec_command("grep VERSION= /etc/os-release")[1].read().decode().strip().split("=")[1].strip('"') + # Get pacemaker version + pacemaker_version = ssh.ssh.exec_command("rpm -q --queryformat '%{VERSION}' pacemaker")[1].read().decode().strip() + print(f"pacemaker_version={pacemaker_version}") + # Create driver instance browser = HawkTestDriver(addr=args.host, port=args.port, browser=args.browser, headless=args.xvfb, @@ -152,7 +156,10 @@ def main(): browser.test('test_remove_clone', results, clone) browser.test('test_add_group', results, group) browser.test('test_remove_group', results, group) - browser.test('test_check_cluster_configuration', results, ssh) + if pacemaker_version < "2.1.8": + results.set_test_status('test_check_cluster_configuration', 'skipped') + else: + browser.test('test_check_cluster_configuration', results, ssh) browser.test('test_click_around_edit_conf', results) if args.slave: browser.addr = args.slave