forked from Katello/katello
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
68 additions
and
72 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# testing provider sync | ||
test "provider sync" provider synchronize --name="$YUM_PROVIDER" --org="$FIRST_ORG" |
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,8 @@ | ||
#testing repositories | ||
test "repo list by org and env" repo list --org="$FIRST_ORG" --environment="$TEST_ENV" | ||
test "repo list by org only" repo list --org="$FIRST_ORG" | ||
test "repo list by org and product" repo list --org="$FIRST_ORG" --product="$FEWUPS_PRODUCT" | ||
REPO_NAME=`$CMD repo list --org="$FIRST_ORG" | grep $FEWUPS_REPO | awk '{print $2}'` | ||
REPO_ID=`$CMD repo list --org="$FIRST_ORG" | grep $FEWUPS_REPO | awk '{print $1}'` | ||
test "repo status for $REPO_ID" repo status --id="$REPO_ID" | ||
test "repo synchronize for $REPO_ID" repo synchronize --id="$REPO_ID" |
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 |
---|---|---|
@@ -1,14 +1,12 @@ | ||
#!/bin/bash | ||
|
||
|
||
#clear | ||
#test "repo delete" repo delete # <-- not implemented yet | ||
#test "product delete" product delete # <-- not implemented yet | ||
skip_test "repo delete" "not yet implemented" repo delete --product="$FEWUPS_PRODUCT" --org="$FIRST_ORG" --name="$FEWUPS_REPO" | ||
skip_test "product delete" "not yet implemented" product delete --provider="$YUM_PROVIDER" --org="$FIRST_ORG" --name="$FEWUPS_PRODUCT" | ||
test "provider delete" provider delete --name="$YUM_PROVIDER" --org="$FIRST_ORG" | ||
test "environment delete" environment delete --name="$TEST_ENV" --org="$FIRST_ORG" | ||
test "environment delete" environment delete --name="$TEST_ENV_3" --org="$FIRST_ORG" | ||
test "org delete" org delete --name="$TEST_ORG" | ||
test "user delete" user delete --username="$TEST_USER" | ||
|
||
summarize | ||
|
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 |
---|---|---|
@@ -1,59 +1,24 @@ | ||
#!/bin/bash | ||
|
||
|
||
#testing ping | ||
test "ping" ping | ||
|
||
#testing user | ||
TEST_USER="user_$RAND" | ||
test "user create" user create --username=$TEST_USER --password=password | ||
test "user update" user update --username=$TEST_USER --password=password | ||
test "user list" user list | ||
test "user info" user info --username=$TEST_USER | ||
|
||
#testing organization | ||
# DEFAULT GLOBAL VARIABLES | ||
FIRST_ORG=ACME_Corporation | ||
TEST_USER="user_$RAND" | ||
TEST_ORG="org_$RAND" | ||
test "org create" org create --name=$TEST_ORG --description="org description" | ||
test "org update" org update --name=$TEST_ORG --description="org description 2" | ||
test "org list" org list | ||
test "org info" org info --name=$TEST_ORG | ||
|
||
#testing environments | ||
TEST_ENV="env_$RAND" | ||
TEST_ENV_2="env_2_$RAND" | ||
TEST_ENV_3="env_3_$RAND" | ||
test "environment create" environment create --org="$FIRST_ORG" --name="$TEST_ENV" --prior="Locker" | ||
test "environment create" environment create --org="$FIRST_ORG" --name="$TEST_ENV_2" --prior="$TEST_ENV" | ||
test "environment update" environment update --org="$FIRST_ORG" --name="$TEST_ENV_2" --new_name="$TEST_ENV_3" | ||
test "environment list" environment list --org="$FIRST_ORG" | ||
test "environment info" environment info --org="$FIRST_ORG" --name="$TEST_ENV" | ||
|
||
#testing provider | ||
YUM_PROVIDER="yum_provider_$RAND" | ||
FEWUPS_REPO="http://lzap.fedorapeople.org/fakerepos/" | ||
FEWUPS_REPO_2="http://lzap.fedorapeople.org/fakerepos/2/" | ||
test "provider create" provider create --name="$YUM_PROVIDER" --org="$FIRST_ORG" --type=yum --url="$FEWUPS_REPO" --description="prov description" | ||
test "provider update" provider update --name="$YUM_PROVIDER" --org="$FIRST_ORG" --url="$FEWUPS_REPO_2" --description="prov description 2" | ||
test "provider list" provider list --org="$FIRST_ORG" | ||
test "provider info" provider info --name="$YUM_PROVIDER" --org="$FIRST_ORG" | ||
|
||
#testing products | ||
FEWUPS_REPO_URL="http://lzap.fedorapeople.org/fakerepos/" | ||
FEWUPS_PRODUCT="fewups_product_$RAND" | ||
test "product create" product create --provider="$YUM_PROVIDER" --org="$FIRST_ORG" --name="$FEWUPS_PRODUCT" --url="$FEWUPS_REPO" | ||
test "product list by org and env" product list --org="$FIRST_ORG" --environment="$TEST_ENV" --provider="$YUM_PROVIDER" | ||
test "product list by org only" product list --org="$FIRST_ORG" | ||
test "product list by org and provider" product list --org="$FIRST_ORG" --provider="$YUM_PROVIDER" | ||
|
||
#testing repositories | ||
REPO="repo_$RAND" | ||
test "repo create" repo create --product="$FEWUPS_PRODUCT" --org="$FIRST_ORG" --name="$REPO" --url="$FEWUPS_REPO" --assumeyes | ||
test "repo list by org and env" repo list --org="$FIRST_ORG" --environment="$TEST_ENV" | ||
test "repo list by org only" repo list --org="$FIRST_ORG" | ||
test "repo list by org and product" repo list --org="$FIRST_ORG" --product="$FEWUPS_PRODUCT" | ||
REPO_NAME=`$CMD repo list --org="$FIRST_ORG" | grep $REPO | grep -i name | awk '{print $2}'` | ||
REPO_ID=`$CMD repo list --org="$FIRST_ORG" | grep $REPO | grep -i id | awk '{print $2}'` | ||
test "repo status" repo status --id="$REPO_ID" | ||
test "repo synchronize" repo synchronize --id="$REPO_ID" | ||
|
||
FEWUPS_REPO="repo_$RAND" | ||
|
||
# BASIC RESOURCES (reused in tests) | ||
test "user create" user create --username=$TEST_USER --password=password | ||
test "org create" org create --name=$TEST_ORG --description="org description" | ||
test "environment create" environment create --org="$FIRST_ORG" --name="$TEST_ENV" --prior="Locker" | ||
test "environment create" environment create --org="$FIRST_ORG" --name="$TEST_ENV_3" --prior="$TEST_ENV" | ||
test "provider create" provider create --name="$YUM_PROVIDER" --org="$FIRST_ORG" --type=yum --url="$FEWUPS_REPO_URL" --description="prov description" | ||
test "product create" product create --provider="$YUM_PROVIDER" --org="$FIRST_ORG" --name="$FEWUPS_PRODUCT" --url="$FEWUPS_REPO_URL" | ||
test "repo create" repo create --product="$FEWUPS_PRODUCT" --org="$FIRST_ORG" --name="$FEWUPS_REPO" --url="$FEWUPS_REPO_URL" --assumeyes |
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,7 @@ | ||
ENV="tstenv_$RAND" | ||
ENV2="tstenv2_$RAND" | ||
test "environment create" environment create --org="$FIRST_ORG" --name="$ENV" --prior="Locker" | ||
test "environment update" environment update --org="$FIRST_ORG" --name="$ENV" --new_name="$ENV2" | ||
test "environment list" environment list --org="$FIRST_ORG" | ||
test "environment info" environment info --org="$FIRST_ORG" --name="$ENV2" | ||
test "environment delete" environment delete --org="$FIRST_ORG" --name="$ENV2" |
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,3 @@ | ||
test "org update" org update --name=$TEST_ORG --description="org description 2" | ||
test "org list" org list | ||
test "org info" org info --name=$TEST_ORG |
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,4 @@ | ||
#testing products | ||
test "product list by org and env" product list --org="$FIRST_ORG" --environment="$TEST_ENV" --provider="$YUM_PROVIDER" | ||
test "product list by org only" product list --org="$FIRST_ORG" | ||
test "product list by org and provider" product list --org="$FIRST_ORG" --provider="$YUM_PROVIDER" |
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 |
---|---|---|
@@ -1,16 +1,6 @@ | ||
#!/bin/bash | ||
|
||
DIR="$( cd "$( dirname "$0" )" && pwd )" | ||
|
||
# testing provider sync | ||
test "provider sync" provider synchronize --name="$YUM_PROVIDER" --org="$FIRST_ORG" | ||
|
||
# importing manifest from our testing export | ||
#testing organization | ||
IMPORT_ORG="Import_Org_$RAND" | ||
IMPORT_PROV="Import_Prov_$RAND" | ||
test "org create" org create --name=$IMPORT_ORG | ||
test "provider create" provider create --org="$IMPORT_ORG" --name="$IMPORT_PROV" --type=redhat --url="https://example.com/path/" | ||
test "provider import_manifest" provider import_manifest --org="$IMPORT_ORG" --name="$IMPORT_PROV" --file=$DIR/export-manifest.zip | ||
test "provider delete" provider delete --org="$IMPORT_ORG" --name="$IMPORT_PROV" | ||
test "org delete" org delete --name=$IMPORT_ORG | ||
#testing provider | ||
test "provider update" provider update --name="$YUM_PROVIDER" --org="$FIRST_ORG" --description="prov description blah 2" | ||
test "provider list" provider list --org="$FIRST_ORG" | ||
test "provider info" provider info --name="$YUM_PROVIDER" --org="$FIRST_ORG" |
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,12 @@ | ||
#!/bin/bash | ||
|
||
DIR="$( cd "$( dirname "$0" )" && pwd )" | ||
|
||
# importing manifest from our testing export | ||
IMPORT_ORG="Import_Org_$RAND" | ||
IMPORT_PROV="Import_Prov_$RAND" | ||
test "org create" org create --name=$IMPORT_ORG | ||
test "provider create" provider create --org="$IMPORT_ORG" --name="$IMPORT_PROV" --type=redhat --url="https://example.com/path/" | ||
test "provider import_manifest" provider import_manifest --org="$IMPORT_ORG" --name="$IMPORT_PROV" --file=$DIR/export-manifest.zip | ||
test "provider delete" provider delete --org="$IMPORT_ORG" --name="$IMPORT_PROV" | ||
test "org delete" org delete --name=$IMPORT_ORG |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/bin/bash | ||
|
||
# testing registration from rhsm | ||
(which subscription-manager >/dev/null && \ | ||
(which subscription-manager 2>/dev/null && \ | ||
test_own_cmd "rhsm registration" sudo subscription-manager register --username=$USER --password=$PASSWORD \ | ||
--org=$FIRST_ORG --environment=$TEST_ENV_3 --name=$HOSTNAME --force) || \ | ||
skip_test "rhsm registration" "subscription-manager command not found" |
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#!/bin/bash | ||
|
||
|
||
# testing systems | ||
SYSTEM_NAME_ADMIN="admin_system_$RAND" | ||
SYSTEM_NAME_ADMIN_2=$SYSTEM_NAME_ADMIN"_2" | ||
|
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,4 @@ | ||
#testing user | ||
test "user update" user update --username=$TEST_USER --password=password | ||
test "user list" user list | ||
test "user info" user info --username=$TEST_USER |
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