forked from pulp/pulp-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes pulp#100
- Loading branch information
David Davis
committed
Jan 28, 2021
1 parent
e092af4
commit 6d6aeed
Showing
7 changed files
with
98 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added label subcommands (set and unset). |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/sh | ||
|
||
# shellcheck source=tests/scripts/config.source | ||
. "$(dirname "$(realpath "$0")")/config.source" | ||
|
||
require_min_pulp "3.10.0" | ||
|
||
cleanup() { | ||
pulp file repository destroy --name "cli_test_file_repo" || true | ||
} | ||
trap cleanup EXIT | ||
|
||
name="cli_test_file_repo" | ||
expect_succ pulp file repository create --name "$name" | ||
expect_succ pulp file repository label set --name "$name" --key "atani" --value "hurin" | ||
expect_succ pulp file repository label set --name "$name" --key "ainu" --value "ulmo" | ||
|
||
expect_succ pulp file repository show --name "$name" | ||
test "$(echo "$OUTPUT" | jq -r .pulp_labels)" = '{ "atani": "hurin", "ainu": "ulmo" }' | ||
|
||
# update a label | ||
expect_succ pulp file repository label set --name "$name" --key "atani" --value "beor" | ||
expect_succ pulp file repository show --name "$name" | ||
test "$(echo "$OUTPUT" | jq -r .pulp_labels)" = '{ "atani": "hurin", "ainu": "ulmo" }' | ||
|
||
# remove a label | ||
expect_succ pulp file repository label unset --name "$name" --key "atani" | ||
expect_succ pulp file repository show --name "$name" | ||
test "$(echo "$OUTPUT" | jq -r .pulp_labels)" = '{ "ainu": "ulmo" }' |
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