Skip to content

Commit

Permalink
feat: adding property to return insights-client version
Browse files Browse the repository at this point in the history
  • Loading branch information
archana-redhat committed Aug 2, 2024
1 parent 1ae66b8 commit db47757
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pytest_client_tools/insights_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,20 @@ def core_version(self):
assert m
return Version(m.group(1))

@property
def client_version(self):
"""
Return the version of insights-client as
[`Version`][pytest_client_tools.util.Version] object.
:return: The version of the insights-client in use.
:rtype: pytest_client_tools.util.Version
"""
proc = self.run("--version")
m = re.search(r"^Client: (.+)+$", proc.stdout, re.MULTILINE)
assert m
return Version(m.group(1))

@property
def uuid(self):
"""
Expand Down

0 comments on commit db47757

Please sign in to comment.