Skip to content

Commit 6f9dd04

Browse files
committed
Cleanup some antipatterns
1 parent 922cf45 commit 6f9dd04

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

actions/setup_e2e_tests.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
set -e
33

44
VERSION=$1
5-
BRANCH=`echo ${VERSION} | cut -d "." -f1-2`
5+
BRANCH=$(echo ${VERSION} | cut -d "." -f1-2)
66
PIP="pip"
77

88
# Install OS specific pre-reqs (Better moved to puppet at some point.)
9-
DEBTEST=`lsb_release -a 2> /dev/null | grep Distributor | awk '{print $3}'`
10-
RHTEST=`cat /etc/redhat-release 2> /dev/null | sed -e "s~\(.*\)release.*~\1~g"`
9+
DEBTEST=$(lsb_release -a 2> /dev/null | grep Distributor | awk '{print $3}')
10+
RHTEST=$(cat /etc/redhat-release 2> /dev/null | sed -e "s~\(.*\)release.*~\1~g")
1111

1212
# Decrease interval for MongoDB TTL expire thread. By default it runs every 60 seconds which
1313
# means we would need to wait at least 60 seconds in our key expire end to end tests.
@@ -18,7 +18,7 @@ echo -e "\nsetParameter:\n ttlMonitorSleepSecs: 1" | sudo tee -a /etc/mongod.co
1818
sudo cat /etc/mongod.conf
1919

2020
if [[ -n "$RHTEST" ]]; then
21-
RHVERSION=`cat /etc/redhat-release 2> /dev/null | sed -r 's/([^0-9]*([0-9]*)){1}.*/\2/'`
21+
RHVERSION=$(cat /etc/redhat-release 2> /dev/null | sed -r 's/([^0-9]*([0-9]*)){1}.*/\2/')
2222
echo "*** Detected Distro is ${RHTEST} - ${RHVERSION} ***"
2323

2424
echo "Restarting MongoDB..."
@@ -54,8 +54,8 @@ if [[ -n "$RHTEST" ]]; then
5454
git clone --branch add_per_test_timing_information --depth 1 https://github.com/Kami/bats-core.git
5555
(cd bats-core; sudo ./install.sh /usr/local)
5656
elif [[ -n "$DEBTEST" ]]; then
57-
DEBVERSION=`lsb_release --release | awk '{ print $2 }'`
58-
SUBTYPE=`lsb_release -a 2>&1 | grep Codename | grep -v "LSB" | awk '{print $2}'`
57+
DEBVERSION=$(lsb_release --release | awk '{ print $2 }')
58+
SUBTYPE=$(lsb_release -a 2>&1 | grep Codename | grep -v "LSB" | awk '{print $2}')
5959
echo "*** Detected Distro is ${DEBTEST} - ${DEBVERSION} ***"
6060

6161
echo "Restarting MongoDB..."
@@ -112,11 +112,11 @@ fi
112112

113113
# Install packs for testing
114114
if [[ ${BRANCH} == "master" ]]; then
115-
echo "Installing st2tests from '${BRANCH}' branch at location: `pwd`..."
115+
echo "Installing st2tests from '${BRANCH}' branch at location: $(pwd)..."
116116
# Can use --recurse-submodules with Git 2.13 and later
117117
git clone --recursive -b ${BRANCH} --depth 1 https://github.com/StackStorm/st2tests.git
118118
else
119-
echo "Installing st2tests from 'v${BRANCH}' branch at location: `pwd`"
119+
echo "Installing st2tests from 'v${BRANCH}' branch at location: $(pwd)"
120120
# Can use --recurse-submodules with Git 2.13 and later
121121
git clone --recursive -b v${BRANCH} --depth 1 https://github.com/StackStorm/st2tests.git
122122
fi

0 commit comments

Comments
 (0)