]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/rook/ci/tests/features/steps/implementation.py
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / pybind / mgr / rook / ci / tests / features / steps / implementation.py
CommitLineData
aee94f69
TL
1from behave import *
2from utils import *
3import re
4
5@when("I run")
6def run_step(context):
7 context.output = run_commands(context.text)
8
9@then("I get")
10def verify_result_step(context):
11 print(f"Output is:\n{context.output}\n--------------\n")
12 assert context.text == context.output
13
14@then("I get something like")
15def verify_fuzzy_result_step(context):
16 output_lines = context.output.split("\n")
17 expected_lines = context.text.split("\n")
18 num_lines = min(len(output_lines), len(expected_lines))
19 for n in range(num_lines):
20 if not re.match(expected_lines[n], output_lines[n]):
21 raise