Skip to content

Commit e3a346b

Browse files
committed
ghe-restore tests use --force to avoid prompts
1 parent 2247105 commit e3a346b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/test-ghe-restore.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ begin_test "ghe-restore into configured vm"
7777
export GHE_RESTORE_HOST
7878

7979
# run ghe-restore and write output to file for asserting against
80-
ghe-restore -v > "$TRASHDIR/restore-out" 2>&1
80+
ghe-restore -v -f > "$TRASHDIR/restore-out" 2>&1
8181
cat "$TRASHDIR/restore-out"
8282

8383
# verify connect to right host
@@ -121,7 +121,7 @@ begin_test "ghe-restore -c into unconfigured vm"
121121
export GHE_RESTORE_HOST
122122

123123
# run ghe-restore and write output to file for asserting against
124-
ghe-restore -v -c > "$TRASHDIR/restore-out" 2>&1
124+
ghe-restore -v -f -c > "$TRASHDIR/restore-out" 2>&1
125125
cat "$TRASHDIR/restore-out"
126126

127127
# verify connect to right host
@@ -165,7 +165,7 @@ begin_test "ghe-restore into unconfigured vm"
165165

166166
# run ghe-restore and write output to file for asserting against
167167
# this should fail due to the appliance being in an unconfigured state
168-
! ghe-restore -v > "$TRASHDIR/restore-out" 2>&1
168+
! ghe-restore -v -f > "$TRASHDIR/restore-out" 2>&1
169169

170170
# verify that ghe-restore failed due to the appliance not being configured
171171
grep -q -e "Error: $GHE_RESTORE_HOST not configured" "$TRASHDIR/restore-out"
@@ -186,7 +186,7 @@ begin_test "ghe-restore with host arg"
186186
export GHE_RESTORE_HOST
187187

188188
# run it
189-
output="$(ghe-restore localhost)" || false
189+
output="$(ghe-restore -f localhost)" || false
190190

191191
# verify host arg overrides configured restore host
192192
echo "$output" | grep -q 'Connect localhost OK'
@@ -220,7 +220,7 @@ begin_test "ghe-restore no host arg or configured restore host"
220220
unset GHE_RESTORE_HOST
221221

222222
# verify running ghe-restore fails
223-
! ghe-restore
223+
! ghe-restore -f
224224
)
225225
end_test
226226

@@ -237,7 +237,7 @@ begin_test "ghe-restore with no pages backup"
237237
rm -rf "$GHE_DATA_DIR/1/pages"
238238

239239
# run it
240-
ghe-restore -v localhost
240+
ghe-restore -v -f localhost
241241
)
242242
end_test
243243

@@ -252,7 +252,7 @@ begin_test "ghe-restore with tarball strategy"
252252

253253
# run it
254254
echo "tarball" > "$GHE_DATA_DIR/current/strategy"
255-
output=$(ghe-restore -v localhost)
255+
output=$(ghe-restore -v -f localhost)
256256

257257
# verify ghe-import-repositories was run on remote side with fake tarball
258258
echo "$output" | grep -q 'fake ghe-export-repositories data'

0 commit comments

Comments
 (0)