Skip to content

Commit

Permalink
U/smk4664 invoke updates (#193)
Browse files Browse the repository at this point in the history
* Support docker tags in `invoke unittest`

* Add Change Fragment

* Update ValueError to use _get_docker_nautobot_version
  • Loading branch information
smk4664 authored Dec 17, 2024
1 parent 215abad commit 9d21b16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions changes/190.housekeeping
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update the version parsing function to retrieve version using _get_docker_nautobot_version.
5 changes: 3 additions & 2 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ def is_truthy(arg):


def _get_test_dump_path(context):
parsed_nautobot_version = context.nautobot_netbox_importer.nautobot_ver.split(".")
version = _get_docker_nautobot_version(context)
parsed_nautobot_version = version.split(".")
if len(parsed_nautobot_version) < 2: # noqa: PLR2004
raise ValueError(f"Can't determine the Nautobot version from: {context.nautobot_netbox_importer.nautobot_ver}")
raise ValueError(f"Can't determine the Nautobot version from: {version}")

return (
Path(__file__).parent
Expand Down

0 comments on commit 9d21b16

Please sign in to comment.