-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix updating annotation without type and keeping old labels instead of removing them * fix parsing tags on incrementing inside promote * fix tests
- Loading branch information
Showing
6 changed files
with
40 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,10 +132,11 @@ def test_commands(showcase): | |
"type": "new-type", | ||
"path": "new/path", | ||
"labels": [ | ||
"some-label", | ||
"another-label" | ||
"another-label", | ||
"new-label", | ||
"some-label" | ||
], | ||
"description": "some description" | ||
"description": "new description" | ||
} | ||
""" | ||
|
||
|
@@ -162,15 +163,28 @@ def test_annotate(empty_git_repo: Tuple[git.Repo, Callable]): | |
], | ||
"", | ||
) | ||
_check_successful_cmd( | ||
"annotate", | ||
[ | ||
"-r", | ||
repo.working_dir, | ||
name, | ||
"--label", | ||
"new-label", | ||
"--description", | ||
"new description", | ||
], | ||
"", | ||
) | ||
artifact = get_index(repo.working_dir, file=True).get_index().state[name] | ||
_check_obj( | ||
artifact, | ||
dict( | ||
type="new-type", | ||
path="new/path", | ||
virtual=True, | ||
labels=["some-label", "another-label"], | ||
description="some description", | ||
labels=["another-label", "new-label", "some-label"], | ||
description="new description", | ||
), | ||
[], | ||
) | ||
|
@@ -232,16 +246,3 @@ def test_promote(repo_with_commit: Tuple[git.Repo, Callable]): | |
["-r", repo.working_dir, "nn2", "prod", "HEAD", "--version", "1.0.0"], | ||
"❌ Version '1.0.0' is not valid. Example of valid version: 'v1.0.0'\n", | ||
) | ||
|
||
_check_successful_cmd( | ||
"promote", | ||
["-r", repo.working_dir, "x", "prod", "HEAD", "--simple"], | ||
"Created git tag '[email protected]' that registers a new version\n" | ||
"Created git tag 'x#prod' that promotes 'v0.0.1'\n", | ||
) | ||
|
||
_check_failing_cmd( | ||
"promote", | ||
["-r", repo.working_dir, "x", "prod", "HEAD", "--simple"], | ||
"❌ Version is already in stage 'prod'\n", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters