summaryrefslogtreecommitdiffstats
path: root/tests/dogtag/acceptance/cli-tests/pki-ca-user-cli/pki-ca-user-cli-ca-user-cert-add.sh
diff options
context:
space:
mode:
authorAsha Akkiangady <aakkiang@redhat.com>2015-06-25 08:26:48 -0400
committerAsha Akkiangady <aakkiang@redhat.com>2015-06-25 08:29:09 -0400
commite5c4e87ac5ce881efa160352ce87ad81026f3446 (patch)
tree1df9bdba61ec75ebc05f27bfb5d3ea3b486f3610 /tests/dogtag/acceptance/cli-tests/pki-ca-user-cli/pki-ca-user-cli-ca-user-cert-add.sh
parentcc97f8628b23f8ea75308bb97a31307cb4f162b9 (diff)
downloadpki-e5c4e87ac5ce881efa160352ce87ad81026f3446.tar.gz
pki-e5c4e87ac5ce881efa160352ce87ad81026f3446.tar.xz
pki-e5c4e87ac5ce881efa160352ce87ad81026f3446.zip
Added subsystem installation status check to
pki ca-user and kra-user tests.
Diffstat (limited to 'tests/dogtag/acceptance/cli-tests/pki-ca-user-cli/pki-ca-user-cli-ca-user-cert-add.sh')
-rwxr-xr-xtests/dogtag/acceptance/cli-tests/pki-ca-user-cli/pki-ca-user-cli-ca-user-cert-add.sh48
1 files changed, 25 insertions, 23 deletions
diff --git a/tests/dogtag/acceptance/cli-tests/pki-ca-user-cli/pki-ca-user-cli-ca-user-cert-add.sh b/tests/dogtag/acceptance/cli-tests/pki-ca-user-cli/pki-ca-user-cli-ca-user-cert-add.sh
index 1a3c9ead5..4eba42578 100755
--- a/tests/dogtag/acceptance/cli-tests/pki-ca-user-cli/pki-ca-user-cli-ca-user-cert-add.sh
+++ b/tests/dogtag/acceptance/cli-tests/pki-ca-user-cli/pki-ca-user-cli-ca-user-cert-add.sh
@@ -49,36 +49,38 @@
########################################################################
run_pki-ca-user-cli-user-cert-add_tests(){
+ subsystemId=$1
+ SUBSYSTEM_TYPE=$2
+ MYROLE=$3
+
+ ##### Create a temporary directory to save output files and initializing host/port variables #####
+ rlPhaseStartSetup "pki_user_cli_user_cert-add-ca-startup: Create temporary directory and initializing host/port variables"
+ rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory"
+ rlRun "pushd $TmpDir"
+ rlPhaseEnd
-subsystemId=$1
-SUBSYSTEM_TYPE=$2
-MYROLE=$3
-ca_instance_created="False"
-
-if [ "$TOPO9" = "TRUE" ] ; then
- prefix=$subsystemId
- ca_instance_created=$(eval echo \$${subsystemId}_INSTANCE_CREATED_STATUS)
-elif [ "$MYROLE" = "MASTER" ] ; then
- if [[ $subsystemId == SUBCA* ]]; then
- prefix=$subsystemId
- ca_instance_created=$(eval echo \$${subsystemId}_INSTANCE_CREATED_STATUS)
+ get_topo_stack $MYROLE $TmpDir/topo_file
+ local CA_INST=$(cat $TmpDir/topo_file | grep MY_CA | cut -d= -f2)
+ ca_instance_created="False"
+ if [ "$TOPO9" = "TRUE" ] ; then
+ prefix=$CA_INST
+ ca_instance_created=$(eval echo \$${CA_INST}_INSTANCE_CREATED_STATUS)
+ elif [ "$MYROLE" = "MASTER" ] ; then
+ if [[ $CA_INST == SUBCA* ]]; then
+ prefix=$CA_INST
+ ca_instance_created=$(eval echo \$${CA_INST}_INSTANCE_CREATED_STATUS)
+ else
+ prefix=ROOTCA
+ ca_instance_created=$(eval echo \$${CA_INST}_INSTANCE_CREATED_STATUS)
+ fi
else
- prefix=ROOTCA
- ca_instance_created=$(eval echo \$${MYROLE}_INSTANCE_CREATED_STATUS)
+ prefix=$MYROLE
+ ca_instance_created=$(eval echo \$${CA_INST}_INSTANCE_CREATED_STATUS)
fi
-else
- prefix=$MYROLE
- ca_instance_created=$(eval echo \$${MYROLE}_INSTANCE_CREATED_STATUS)
-fi
if [ "$ca_instance_created" = "TRUE" ] ; then
CA_HOST=$(eval echo \$${MYROLE})
CA_PORT=$(eval echo \$${subsystemId}_UNSECURE_PORT)
- ##### Create a temporary directory to save output files and initializing host/port variables #####
- rlPhaseStartSetup "pki_user_cli_user_cert-add-ca-startup: Create temporary directory and initializing host/port variables"
- rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory"
- rlRun "pushd $TmpDir"
- rlPhaseEnd
local cert_info="$TmpDir/cert_info"
user1=testuser1