Skip to content

Commit

Permalink
Detect pacemaker version, conditionally run test_check_cluster_config…
Browse files Browse the repository at this point in the history
…uration
  • Loading branch information
Dawei-Pang committed Sep 11, 2024
1 parent 8945dc8 commit ef759d4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion e2e_test/hawk_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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('"')

# Compare pacemaker version with 2.1.8 accroding to https://github.com/ClusterLabs/hawk/pull/276
# zypper vcmp return 1 for smaller than 2.1.8, otherwise equal or larger than 2.1.8
pacemaker_version_comp = ssh.ssh.exec_command("zypper -t vcmp 2.1.8 $(rpm -q --queryformat '%{VERSION}' pacemaker)")[1].read().decode().strip()

# Create driver instance
browser = HawkTestDriver(addr=args.host, port=args.port,
browser=args.browser, headless=args.xvfb,
Expand Down Expand Up @@ -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_comp == "1":
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
Expand Down

0 comments on commit ef759d4

Please sign in to comment.