diff options
author | Asha Akkiangady <aakkiang@redhat.com> | 2014-12-06 08:13:56 -0500 |
---|---|---|
committer | Asha Akkiangady <aakkiang@redhat.com> | 2014-12-06 08:19:26 -0500 |
commit | 713f1840695c684a63898e29524946c01f1d55a0 (patch) | |
tree | 744e1f2738b54978e49abd03ef2095a8c8889c16 /tests/dogtag/acceptance/cli-tests/pki-ca-user-cli/pki-ca-user-cli-ca-user-del.sh | |
parent | 7ed1c2e78f7531821c7e5a998b97ee1b7fb6b5a8 (diff) | |
download | pki-713f1840695c684a63898e29524946c01f1d55a0.tar.gz pki-713f1840695c684a63898e29524946c01f1d55a0.tar.xz pki-713f1840695c684a63898e29524946c01f1d55a0.zip |
CLI user-add and ca-user-add tests modified
to have random strings generated with openssl
rand and $RANDOM.
Diffstat (limited to 'tests/dogtag/acceptance/cli-tests/pki-ca-user-cli/pki-ca-user-cli-ca-user-del.sh')
-rwxr-xr-x | tests/dogtag/acceptance/cli-tests/pki-ca-user-cli/pki-ca-user-cli-ca-user-del.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/dogtag/acceptance/cli-tests/pki-ca-user-cli/pki-ca-user-cli-ca-user-del.sh b/tests/dogtag/acceptance/cli-tests/pki-ca-user-cli/pki-ca-user-cli-ca-user-del.sh index 64927e732..cdf219a3b 100755 --- a/tests/dogtag/acceptance/cli-tests/pki-ca-user-cli/pki-ca-user-cli-ca-user-del.sh +++ b/tests/dogtag/acceptance/cli-tests/pki-ca-user-cli/pki-ca-user-cli-ca-user-del.sh @@ -196,7 +196,7 @@ run_pki-ca-user-cli-ca-user-del_tests(){ rlPhaseEnd rlPhaseStartTest "pki_ca_user_cli_ca_user_del-006: Maximum length of user id" - user2=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 2048 | head -n 1` + user2=$(openssl rand -base64 30000 | strings | grep -io [[:alnum:]] | head -n 2047 | tr -d '\n') rlRun "pki -d $CERTDB_DIR \ -n ${prefix}_adminV \ -c $CERTDB_DIR_PASSWORD \ @@ -227,7 +227,9 @@ run_pki-ca-user-cli-ca-user-del_tests(){ rlPhaseEnd rlPhaseStartTest "pki_ca_user_cli_ca_user_del-007: userid with maximum length and symbols" - userid=`cat /dev/urandom | tr -dc 'a-zA-Z0-9!?@~#*^_+$' | fold -w 2048 | head -n 1` + specialcharacters="!?@~#*^_+$" + userid=$(openssl rand -base64 30000 | strings | grep -io [[:alnum:]] | head -n 2037 | tr -d '\n') + userid=$userid$specialcharacters rlRun "pki -d $CERTDB_DIR \ -n ${prefix}_adminV \ -c $CERTDB_DIR_PASSWORD \ @@ -676,4 +678,3 @@ Import CA certificate (Y/n)? \"" >> $expfile rlRun "rm -r $TmpDir" 0 "Removing tmp directory" rlPhaseEnd } - |