Skip to content

Commit 9ce398d

Browse files
committed
Expand tests to cover more publication options
1 parent 4fe86ef commit 9ce398d

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

tests/scripts/pulp_deb/test_deb_sync_publish.sh

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ expect_succ pulp deb repository create \
2626
expect_succ pulp deb repository sync \
2727
--name "${ENTITIES_NAME}_repo"
2828

29-
if pulp debug has-plugin --name deb --min-version 2.20.0.dev; then
29+
if pulp debug has-plugin --name deb --specifier ">=2.20.0"; then
3030
expect_succ pulp deb repository sync \
3131
--name "${ENTITIES_NAME}_repo" \
3232
--optimize
@@ -37,8 +37,11 @@ if pulp debug has-plugin --name deb --min-version 2.20.0.dev; then
3737
fi
3838

3939
expect_succ pulp deb publication create \
40-
--repository "${ENTITIES_NAME}_repo" \
41-
--simple
40+
--repository "${ENTITIES_NAME}_repo"
41+
42+
test "$(echo "${OUTPUT}" | jq -r '.checkpoint')" = "false"
43+
test "$(echo "${OUTPUT}" | jq -r '.structured')" = "true"
44+
test "$(echo "${OUTPUT}" | jq -r '.simple')" = "false"
4245

4346
PUBLICATION_HREF=$(echo "$OUTPUT" | jq -r .pulp_href)
4447

@@ -48,5 +51,21 @@ expect_succ pulp deb distribution create --name "${ENTITIES_NAME}_distro" \
4851

4952
expect_succ pulp deb distribution destroy --name "${ENTITIES_NAME}_distro"
5053
expect_succ pulp deb publication destroy --href "${PUBLICATION_HREF}"
51-
expect_succ pulp deb repository destroy --name "${ENTITIES_NAME}_repo"
5254
expect_succ pulp deb remote destroy --name "${ENTITIES_NAME}_remote"
55+
56+
57+
# Test more unusual publication options:
58+
59+
expect_succ pulp deb publication create \
60+
--repository "${ENTITIES_NAME}_repo" \
61+
--checkpoint \
62+
--simple \
63+
--no-structured
64+
65+
test "$(echo "${OUTPUT}" | jq -r '.checkpoint')" = "true"
66+
test "$(echo "${OUTPUT}" | jq -r '.structured')" = "false"
67+
test "$(echo "${OUTPUT}" | jq -r '.simple')" = "true"
68+
69+
PUBLICATION_HREF=$(echo "$OUTPUT" | jq -r .pulp_href)
70+
expect_succ pulp deb publication destroy --href "${PUBLICATION_HREF}"
71+
expect_succ pulp deb repository destroy --name "${ENTITIES_NAME}_repo"

0 commit comments

Comments
 (0)