@@ -76,6 +76,10 @@ begin_test "ghe-restore into configured vm"
7676 touch " $GHE_REMOTE_ROOT_DIR /etc/github/configured"
7777 fi
7878
79+ # create file used to determine if instance is in maintenance mode.
80+ mkdir -p " $GHE_REMOTE_DATA_DIR /github/current/public/system"
81+ touch " $GHE_REMOTE_DATA_DIR /github/current/public/system/maintenance.html"
82+
7983 # set restore host environ var
8084 GHE_RESTORE_HOST=127.0.0.1
8185 export GHE_RESTORE_HOST
@@ -133,6 +137,10 @@ begin_test "ghe-restore aborts without user verification"
133137 touch " $GHE_REMOTE_ROOT_DIR /etc/github/configured"
134138 fi
135139
140+ # create file used to determine if instance is in maintenance mode.
141+ mkdir -p " $GHE_REMOTE_DATA_DIR /github/current/public/system"
142+ touch " $GHE_REMOTE_DATA_DIR /github/current/public/system/maintenance.html"
143+
136144 # set restore host environ var
137145 GHE_RESTORE_HOST=127.0.0.1
138146 export GHE_RESTORE_HOST
@@ -160,6 +168,10 @@ begin_test "ghe-restore accepts user verification"
160168 touch " $GHE_REMOTE_ROOT_DIR /etc/github/configured"
161169 fi
162170
171+ # create file used to determine if instance is in maintenance mode.
172+ mkdir -p " $GHE_REMOTE_DATA_DIR /github/current/public/system"
173+ touch " $GHE_REMOTE_DATA_DIR /github/current/public/system/maintenance.html"
174+
163175 # set restore host environ var
164176 GHE_RESTORE_HOST=127.0.0.1
165177 export GHE_RESTORE_HOST
@@ -182,6 +194,10 @@ begin_test "ghe-restore -c into unconfigured vm"
182194 GHE_RESTORE_HOST=127.0.0.1
183195 export GHE_RESTORE_HOST
184196
197+ # create file used to determine if instance is in maintenance mode.
198+ mkdir -p " $GHE_REMOTE_DATA_DIR /github/current/public/system"
199+ touch " $GHE_REMOTE_DATA_DIR /github/current/public/system/maintenance.html"
200+
185201 # run ghe-restore and write output to file for asserting against
186202 if ! ghe-restore -v -f -c > " $TRASHDIR /restore-out" 2>&1 ; then
187203 cat " $TRASHDIR /restore-out"
@@ -227,6 +243,10 @@ begin_test "ghe-restore into unconfigured vm"
227243 GHE_RESTORE_HOST=127.0.0.1
228244 export GHE_RESTORE_HOST
229245
246+ # create file used to determine if instance is in maintenance mode.
247+ mkdir -p " $GHE_REMOTE_DATA_DIR /github/current/public/system"
248+ touch " $GHE_REMOTE_DATA_DIR /github/current/public/system/maintenance.html"
249+
230250 if [ " $GHE_VERSION_MAJOR " -le 1 ]; then
231251 # run ghe-restore and write output to file for asserting against
232252 # this should fail due to the appliance being in an unconfigured state
@@ -284,6 +304,10 @@ begin_test "ghe-restore with host arg"
284304 touch " $GHE_REMOTE_ROOT_DIR /etc/github/configured"
285305 fi
286306
307+ # create file used to determine if instance is in maintenance mode.
308+ mkdir -p " $GHE_REMOTE_DATA_DIR /github/current/public/system"
309+ touch " $GHE_REMOTE_DATA_DIR /github/current/public/system/maintenance.html"
310+
287311 # set restore host environ var
288312 GHE_RESTORE_HOST=127.0.0.1
289313 export GHE_RESTORE_HOST
@@ -323,6 +347,10 @@ begin_test "ghe-restore no host arg or configured restore host"
323347 touch " $GHE_REMOTE_ROOT_DIR /etc/github/configured"
324348 fi
325349
350+ # create file used to determine if instance is in maintenance mode.
351+ mkdir -p " $GHE_REMOTE_DATA_DIR /github/current/public/system"
352+ touch " $GHE_REMOTE_DATA_DIR /github/current/public/system/maintenance.html"
353+
326354 # unset configured restore host
327355 unset GHE_RESTORE_HOST
328356
@@ -344,6 +372,10 @@ begin_test "ghe-restore with no pages backup"
344372 touch " $GHE_REMOTE_ROOT_DIR /etc/github/configured"
345373 fi
346374
375+ # create file used to determine if instance is in maintenance mode.
376+ mkdir -p " $GHE_REMOTE_DATA_DIR /github/current/public/system"
377+ touch " $GHE_REMOTE_DATA_DIR /github/current/public/system/maintenance.html"
378+
347379 # remove pages data
348380 rm -rf " $GHE_DATA_DIR /1/pages"
349381
@@ -365,6 +397,10 @@ begin_test "ghe-restore with tarball strategy"
365397 touch " $GHE_REMOTE_ROOT_DIR /etc/github/configured"
366398 fi
367399
400+ # create file used to determine if instance is in maintenance mode.
401+ mkdir -p " $GHE_REMOTE_DATA_DIR /github/current/public/system"
402+ touch " $GHE_REMOTE_DATA_DIR /github/current/public/system/maintenance.html"
403+
368404 # run it
369405 echo " tarball" > " $GHE_DATA_DIR /current/strategy"
370406 output=$( ghe-restore -v -f localhost)
0 commit comments