Skip to content

Commit 0ab363f

Browse files
committed
Fix some test breakages
1 parent 1276111 commit 0ab363f

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

linux/scripts/test.bats

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ teardown() {
5353
}
5454
rm -f /etc/systemd/system/app-deb.service
5555
systemctl daemon-reload
56-
rm -f /opt/app/dist/debian/app/usr/bin/app
57-
rm -f /opt/app/dist/debian/app.deb
56+
rm -f /opt/app/dist/linux/app/usr/bin/app
57+
rm -f /opt/app/dist/linux/app.deb
5858
apt-get remove -y app
5959

6060
# Challenge 5
@@ -67,7 +67,7 @@ teardown_file() {
6767
teardown
6868
rm -f /home/appuser/challenge_{2..200}.md # just to be sure to catch any non-0 or 1 challenges
6969
rm -f /home/appuser/congrats.md
70-
rm -r "${wsroot}"/team_has_been_congratulated
70+
rm -f "${wsroot}"/team_has_been_congratulated
7171
systemctl start linux-workshop-admin.timer
7272
}
7373

@@ -81,6 +81,9 @@ _reset-score() {
8181
_get-score() {
8282
systemctl reset-failed # to reset systemd restart rate-limiter, if other means fail to do so
8383
systemctl start linux-workshop-admin.service --wait
84+
# Need to stop again becaue starting the .service restarts the timer because
85+
# of its 'Want' directive
86+
systemctl stop linux-workshop-admin.timer
8487
local score="$(psql -U postgres -h "${db_addr}" -tAc 'SELECT SUM(score) FROM scoring;')"
8588
printf '%s' "${score}"
8689
}
@@ -118,9 +121,9 @@ EOF
118121

119122
_solve-challenge-4() {
120123
_solve-challenge-3
121-
cp /opt/app/app /opt/app/dist/debian/app/usr/bin/app
122-
dpkg-deb --build /opt/app/dist/debian/app
123-
apt-get install -y /opt/app/dist/debian/app.deb
124+
cp /opt/app/app /opt/app/dist/linux/app/usr/bin/app
125+
dpkg-deb --build /opt/app/dist/linux/app
126+
apt-get install -y /opt/app/dist/linux/app.deb
124127
cat <<EOF > /etc/systemd/system/app-deb.service
125128
[Unit]
126129
Description=Prints money!

0 commit comments

Comments
 (0)