Skip to content

Commit

Permalink
Test if bluechictl version is aligned with RPM version
Browse files Browse the repository at this point in the history
Tests if bluechictl version aligns with the version provided by RPM
package.

Signed-off-by: Martin Perina <mperina@redhat.com>
  • Loading branch information
mwperina committed Feb 22, 2024
1 parent 1ff9217 commit 4119ba9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/bluechi_test/bluechictl.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,12 @@ def disable_metrics(self, check_result: bool = True, expected_result: int = 0) \
check_result,
expected_result
)

def version(self, check_result: bool = True, expected_result: int = 0) \
-> Tuple[Optional[int], Union[Iterator[bytes], Any, Tuple[bytes, bytes]]]:
return self._run(
"Getting version",
"version",
check_result,
expected_result
)
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ def check_help_option(ctrl: BluechiControllerMachine, _: Dict[str, BluechiAgentM
assert s_out == l_out
assert bc_ver_rel in s_out

bctl_re, bctl_out = ctrl.bluechictl.version()
assert bctl_re == 0
assert bc_ver_rel in bctl_out


def test_version_option_provided(bluechi_test: BluechiTest, bluechi_ctrl_default_config: BluechiControllerConfig):
bluechi_test.set_bluechi_controller_config(bluechi_ctrl_default_config)
Expand Down

0 comments on commit 4119ba9

Please sign in to comment.