Update some grammer issues in the test Bash scripts

Related: rhbz#1656105
This commit is contained in:
Chris Roberts 2019-03-21 15:31:04 -04:00 committed by Alexander Todorov
parent 48a28e0950
commit c6e8befe21
2 changed files with 14 additions and 14 deletions

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# Note: execute this file from the project root directory # Note: Execute this file from the project root directory
##### #####
# #
@ -64,7 +64,7 @@ rlJournalStart
SAMPLES="$SAMPLES/samples" SAMPLES="$SAMPLES/samples"
rlPhaseEnd rlPhaseEnd
rlPhaseStartTest "compose start" rlPhaseStartTest "Compose start"
rlAssertEquals "SELinux operates in enforcing mode" "$(getenforce)" "Enforcing" rlAssertEquals "SELinux operates in enforcing mode" "$(getenforce)" "Enforcing"
SSH_KEY_DIR=`mktemp -d /tmp/composer-ssh-keys.XXXXXX` SSH_KEY_DIR=`mktemp -d /tmp/composer-ssh-keys.XXXXXX`
rlRun -t -c "ssh-keygen -t rsa -N '' -f $SSH_KEY_DIR/id_rsa" rlRun -t -c "ssh-keygen -t rsa -N '' -f $SSH_KEY_DIR/id_rsa"
@ -92,7 +92,7 @@ __EOF__
UUID=`echo $UUID | cut -f 2 -d' '` UUID=`echo $UUID | cut -f 2 -d' '`
rlPhaseEnd rlPhaseEnd
rlPhaseStartTest "compose finished" rlPhaseStartTest "Compose finished"
if [ -n "$UUID" ]; then if [ -n "$UUID" ]; then
until $CLI compose details $UUID | grep FINISHED; do until $CLI compose details $UUID | grep FINISHED; do
rlLogInfo "Waiting for compose to finish ..." rlLogInfo "Waiting for compose to finish ..."
@ -109,7 +109,7 @@ __EOF__
python $SAMPLES/upload_file_to_datastore.py -S -s $V_HOST -u $V_USERNAME -p $V_PASSWORD \ python $SAMPLES/upload_file_to_datastore.py -S -s $V_HOST -u $V_USERNAME -p $V_PASSWORD \
-d $V_DATASTORE -l `readlink -f $IMAGE` -r $IMAGE -d $V_DATASTORE -l `readlink -f $IMAGE` -r $IMAGE
rlAssert0 "Image upload successfull" $? rlAssert0 "Image upload successful" $?
rlPhaseEnd rlPhaseEnd
rlPhaseStartTest "Start VM instance" rlPhaseStartTest "Start VM instance"
@ -125,7 +125,7 @@ __EOF__
rlLogInfo "INSTANCE_UUID=$INSTANCE_UUID" rlLogInfo "INSTANCE_UUID=$INSTANCE_UUID"
fi fi
# wait for instance to become running and had assigned a public IP # Wait for instance to become running and had assigned a public IP
IP_ADDRESS="None" IP_ADDRESS="None"
while [ "$IP_ADDRESS" == "None" ]; do while [ "$IP_ADDRESS" == "None" ]; do
rlLogInfo "IP_ADDRESS is not assigned yet ..." rlLogInfo "IP_ADDRESS is not assigned yet ..."
@ -141,12 +141,12 @@ __EOF__
rlPhaseEnd rlPhaseEnd
rlPhaseStartTest "Verify VM instance" rlPhaseStartTest "Verify VM instance"
# verify we can login into that instance # Verify we can login into that instance
rlRun -t -c "ssh -oStrictHostKeyChecking=no -i $SSH_KEY_DIR/id_rsa root@$IP_ADDRESS 'cat /etc/redhat-release'" rlRun -t -c "ssh -oStrictHostKeyChecking=no -i $SSH_KEY_DIR/id_rsa root@$IP_ADDRESS 'cat /etc/redhat-release'"
rlPhaseEnd rlPhaseEnd
rlPhaseStartCleanup rlPhaseStartCleanup
# note: vmdk disk is removed when destroying the VM # note: VMDK disk is removed when destroying the VM
python $SAMPLES/destroy_vm.py -S -s $V_HOST -u $V_USERNAME -p $V_PASSWORD --uuid $INSTANCE_UUID python $SAMPLES/destroy_vm.py -S -s $V_HOST -u $V_USERNAME -p $V_PASSWORD --uuid $INSTANCE_UUID
rlAssert0 "VM destroyed" $? rlAssert0 "VM destroyed" $?
rlRun -t -c "$CLI compose delete $UUID" rlRun -t -c "$CLI compose delete $UUID"

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# Note: execute this file from the project root directory # Note: Execute this file from the project root directory
# setup # setup
rm -rf /var/tmp/beakerlib-*/ rm -rf /var/tmp/beakerlib-*/
@ -26,7 +26,7 @@ if [ -z "$CLI" ]; then
chmod a+rx -R $SHARE_DIR chmod a+rx -R $SHARE_DIR
setup_tests $SHARE_DIR setup_tests $SHARE_DIR
# start the lorax-composer daemon # Start the lorax-composer daemon
./src/sbin/lorax-composer --sharedir $SHARE_DIR $BLUEPRINTS_DIR & ./src/sbin/lorax-composer --sharedir $SHARE_DIR $BLUEPRINTS_DIR &
else else
SHARE_DIR="/usr/share/lorax" SHARE_DIR="/usr/share/lorax"
@ -35,7 +35,7 @@ else
fi fi
# wait for the backend to become ready # Wait for the backend to become ready
tries=0 tries=0
until curl -m 15 --unix-socket /run/weldr/api.socket http://localhost:4000/api/status | grep 'db_supported.*true'; do until curl -m 15 --unix-socket /run/weldr/api.socket http://localhost:4000/api/status | grep 'db_supported.*true'; do
tries=$((tries + 1)) tries=$((tries + 1))
@ -50,11 +50,11 @@ done;
export BEAKERLIB_JOURNAL=0 export BEAKERLIB_JOURNAL=0
export PATH="/usr/local/bin:$PATH" export PATH="/usr/local/bin:$PATH"
if [ -z "$*" ]; then if [ -z "$*" ]; then
# invoke cli/ tests which can be executed without special preparation # Invoke cli/ tests which can be executed without special preparation
./tests/cli/test_blueprints_sanity.sh ./tests/cli/test_blueprints_sanity.sh
./tests/cli/test_compose_sanity.sh ./tests/cli/test_compose_sanity.sh
else else
# execute other cli tests which need more adjustments in the calling environment # Execute other cli tests which need more adjustments in the calling environment
# or can't be executed inside Travis CI # or can't be executed inside Travis CI
for TEST in "$@"; do for TEST in "$@"; do
./$TEST ./$TEST
@ -76,8 +76,8 @@ else
systemctl start lorax-composer systemctl start lorax-composer
fi fi
# look for failures # Look for failures
grep RESULT_STRING /var/tmp/beakerlib-*/TestResults | grep -v PASS && exit 1 grep RESULT_STRING /var/tmp/beakerlib-*/TestResults | grep -v PASS && exit 1
# explicit return code for Makefile # Explicit return code for Makefile
exit 0 exit 0