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 10, 2024
1 parent 8945dc8 commit 3482a5d
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('"')

# 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,
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 < "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
Expand Down

0 comments on commit 3482a5d

Please sign in to comment.