Skip to content

Commit

Permalink
fixing system tests for cli - templates
Browse files Browse the repository at this point in the history
  • Loading branch information
lzap committed Dec 5, 2011
1 parent c77b14c commit 864678c
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions scripts/system-test/cli_tests/template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ test_success "template list" template list --org="$TEST_ORG" --environment="Lock
test_success "template update add product" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --add_product="$FEWUPS_PRODUCT"
test_success "template update add package" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --add_package="cheetah"
test_success "template update add package using nvrea" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --add_package="lion-0.3-0.8.noarch.rpm"
test_success "template update add package group" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --add_package_group="$PACKAGE_GROUP_NAME"
test_success "template update add package group categrory" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --add_package_group_category="$PACKAGE_GROUP_CATEGORY_NAME"
test_success "template update add package group" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --add_package_group="mammal"
test_success "template update add package group categrory" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --add_package_group_category="all"
test_success "template update add parameter" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --add_parameter="attr" --value="X"

check_delayed_jobs_running
Expand All @@ -29,21 +29,20 @@ test_success "create a changeset for promoting the template" changeset create -
test_success "add template to the changeset" changeset update --org="$TEST_ORG" --environment="$TEST_ENV" --name="$TEMPLATE_CS_NAME" --add_template="$TEMPLATE_NAME"
test_success "promote a changeset with the template" changeset promote --org="$TEST_ORG" --environment="$TEST_ENV" --name="$TEMPLATE_CS_NAME"

# TODO add distribution test (we need a small repo with distribution - then swap the following tests to "success")

test_success "template export in tdl" template export --name="$TEMPLATE_NAME" --org="$TEST_ORG" --format=tdl --file=template.out --environment="$TEST_ENV"
test_success "template export in tdl" template export --name="$TEMPLATE_NAME" --org="$TEST_ORG" --format=tdl --file=template.out --environment="$TEST_ENV"
test_success "template export in json" template export --name="$TEMPLATE_NAME" --org="$TEST_ORG" --format=json --file=template.out --environment="$TEST_ENV"
test_success "template export in json (default)" template export --name="$TEMPLATE_NAME" --org="$TEST_ORG" --file=template.out --environment="$TEST_ENV"
if [ -e template.out ] ; then rm template.out ; fi
test_failure "template export in tdl" template export --name="$TEMPLATE_NAME" --org="$TEST_ORG" --format=tdl --file=/dev/null --environment="$TEST_ENV"
test_failure "template export in tdl" template export --name="$TEMPLATE_NAME" --org="$TEST_ORG" --format=tdl --file=/dev/null --environment="$TEST_ENV"
test_success "template export in json" template export --name="$TEMPLATE_NAME" --org="$TEST_ORG" --format=json --file=/dev/null --environment="$TEST_ENV"
test_success "template export in json (default)" template export --name="$TEMPLATE_NAME" --org="$TEST_ORG" --file=/dev/null --environment="$TEST_ENV"

test_success "template update remove parameter" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --remove_parameter="attr"
test_success "template update remove package group category" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --remove_package_group_category="$PACKAGE_GROUP_CATEGORY_NAME"
test_success "template update remove package group" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --remove_package_group="$PACKAGE_GROUP_NAME"
test_success "template update remove package group category" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --remove_package_group_category="all"
test_success "template update remove package group" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --remove_package_group="mammal"
test_success "template update remove package" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --remove_package="cheetah"
test_success "template update remove package using nvrea" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --remove_package="lion-0.3-0.8.noarch.rpm"
test_success "template update remove product" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --remove_product="$FEWUPS_PRODUCT"


test_failure "template update add unknown product" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --add_product="does_not_exist"
test_failure "template update add unknown package" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --add_package="does_not_exist"
test_failure "template update add unknown product" template update --name="$TEMPLATE_NAME" --org="$TEST_ORG" --add_package_group="does_not_exist"
Expand Down

0 comments on commit 864678c

Please sign in to comment.