@@ -193,82 +193,86 @@ title "gix pack-receive"
193193 )
194194)
195195
196- title " gix remote-ref-list"
197- (when " running 'remote-ref-list'"
198- snapshot=" $snapshot /remote-ref-list"
199- (small-repo-in-sandbox
200- if [[ " $kind " != " small" ]]; then
196+ title " gix remote"
197+ (when " running 'remote'"
198+ snapshot=" $snapshot /remote"
199+ title " gix remote ref-list"
200+ (with " the 'ref-list' subcommand"
201+ snapshot=" $snapshot /ref-list"
202+ (small-repo-in-sandbox
203+ if [[ " $kind " != " small" ]]; then
201204
202- if [[ " $kind " != " async" ]]; then
203- (with " file:// protocol"
204- (with " version 1"
205- it " generates the correct output" && {
206- WITH_SNAPSHOT=" $snapshot /file-v-any" \
207- expect_run $SUCCESSFULLY " $exe_plumbing " remote-ref-list -p 1 .git
208- }
209- )
210- (with " version 2"
211- it " generates the correct output" && {
212- WITH_SNAPSHOT=" $snapshot /file-v-any" \
213- expect_run $SUCCESSFULLY " $exe_plumbing " remote-ref-list --protocol 2 " $PWD /.git"
214- }
215- )
216- if test " $kind " = " max" ; then
217- (with " --format json"
218- it " generates the correct output in JSON format" && {
219- WITH_SNAPSHOT=" $snapshot /file-v-any-json" \
220- expect_run $SUCCESSFULLY " $exe_plumbing " --format json remote-ref-list .git
221- }
205+ if [[ " $kind " != " async" ]]; then
206+ (with " file:// protocol"
207+ (with " version 1"
208+ it " generates the correct output" && {
209+ WITH_SNAPSHOT=" $snapshot /file-v-any" \
210+ expect_run $SUCCESSFULLY " $exe_plumbing " remote ref-list -p 1 .git
211+ }
212+ )
213+ (with " version 2"
214+ it " generates the correct output" && {
215+ WITH_SNAPSHOT=" $snapshot /file-v-any" \
216+ expect_run $SUCCESSFULLY " $exe_plumbing " remote ref-list --protocol 2 " $PWD /.git"
217+ }
218+ )
219+ if test " $kind " = " max" ; then
220+ (with " --format json"
221+ it " generates the correct output in JSON format" && {
222+ WITH_SNAPSHOT=" $snapshot /file-v-any-json" \
223+ expect_run $SUCCESSFULLY " $exe_plumbing " --format json remote ref-list .git
224+ }
225+ )
226+ fi
222227 )
223228 fi
224- )
225- fi
226229
227- (with " git:// protocol"
228- launch-git-daemon
229- (with " version 1"
230- it " generates the correct output" && {
231- WITH_SNAPSHOT=" $snapshot /file-v-any" \
232- expect_run $SUCCESSFULLY " $exe_plumbing " remote-ref-list -p 1 git://localhost/
233- }
234- )
235- (with " version 2"
236- it " generates the correct output" && {
237- WITH_SNAPSHOT=" $snapshot /file-v-any" \
238- expect_run $SUCCESSFULLY " $exe_plumbing " remote-ref-list -p 2 git://localhost/
239- }
240- )
241- )
242- if [[ " $kind " == " small" ]]; then
243- (with " https:// protocol (in small builds)"
244- it " fails as http is not compiled in" && {
245- WITH_SNAPSHOT=" $snapshot /fail-http-in-small" \
246- expect_run $WITH_FAILURE " $exe_plumbing " remote-ref-list -p 1 https://github.com/byron/gitoxide
247- }
248- )
249- fi
250- (on_ci
251- if [[ " $kind " = " max" ]]; then
252- (with " https:// protocol"
230+ (with " git:// protocol"
231+ launch-git-daemon
253232 (with " version 1"
254233 it " generates the correct output" && {
255- expect_run $SUCCESSFULLY " $exe_plumbing " remote-ref-list -p 1 https://github.com/byron/gitoxide
234+ WITH_SNAPSHOT=" $snapshot /file-v-any" \
235+ expect_run $SUCCESSFULLY " $exe_plumbing " remote ref-list -p 1 git://localhost/
256236 }
257237 )
258238 (with " version 2"
259239 it " generates the correct output" && {
260- expect_run $SUCCESSFULLY " $exe_plumbing " remote-ref-list -p 2 https://github.com/byron/gitoxide
240+ WITH_SNAPSHOT=" $snapshot /file-v-any" \
241+ expect_run $SUCCESSFULLY " $exe_plumbing " remote ref-list -p 2 git://localhost/
261242 }
262243 )
263244 )
245+ if [[ " $kind " == " small" ]]; then
246+ (with " https:// protocol (in small builds)"
247+ it " fails as http is not compiled in" && {
248+ WITH_SNAPSHOT=" $snapshot /fail-http-in-small" \
249+ expect_run $WITH_FAILURE " $exe_plumbing " remote ref-list -p 1 https://github.com/byron/gitoxide
250+ }
251+ )
252+ fi
253+ (on_ci
254+ if [[ " $kind " = " max" ]]; then
255+ (with " https:// protocol"
256+ (with " version 1"
257+ it " generates the correct output" && {
258+ expect_run $SUCCESSFULLY " $exe_plumbing " remote ref-list -p 1 https://github.com/byron/gitoxide
259+ }
260+ )
261+ (with " version 2"
262+ it " generates the correct output" && {
263+ expect_run $SUCCESSFULLY " $exe_plumbing " remote ref-list -p 2 https://github.com/byron/gitoxide
264+ }
265+ )
266+ )
267+ fi
268+ )
269+ else
270+ it " fails as the CLI doesn't include networking in 'small' mode" && {
271+ WITH_SNAPSHOT=" $snapshot /remote ref-list-no-networking-in-small-failure" \
272+ expect_run 2 " $exe_plumbing " remote ref-list -p 1 .git
273+ }
264274 fi
265275 )
266- else
267- it " fails as the CLI doesn't include networking in 'small' mode" && {
268- WITH_SNAPSHOT=" $snapshot /remote-ref-list-no-networking-in-small-failure" \
269- expect_run 2 " $exe_plumbing " remote-ref-list -p 1 .git
270- }
271- fi
272276 )
273277)
274278
0 commit comments