File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -272,4 +272,32 @@ test_expect_success 'flux batch: multiline --add-file requires name=' '
272272 test_must_fail flux batch --dry-run directives6.sh >d6.out 2>&1 &&
273273 grep "file name missing" d6.out
274274'
275+ test_expect_success ' flux batch: hidden --add-brokers option requires -N' '
276+ test_must_fail flux batch -n4 --add-brokers=1 --dry-run --wrap true
277+ '
278+ test_expect_success ' flux batch: hidden --add-brokers option works' '
279+ cat <<-EOF >add-brokers.sh &&
280+ #!/bin/sh
281+ # flux: -N4 --output=add-brokers.out --error=add-brokers.err
282+ # flux: --conf=tbon.topo=kary:2
283+ # flux: --add-brokers=2
284+ #
285+ flux resource list -s free -no {nnodes}
286+ flux resource status -s exclude -no {ranks}
287+ flux exec -lr 1-2 flux getattr tbon.parent-endpoint \
288+ | sed s#://.*## | sort
289+ flux run -N4 true
290+ EOF
291+ cat <<-EOF >add-brokers.expected &&
292+ 4
293+ 1-2
294+ 1: ipc
295+ 2: ipc
296+ EOF
297+ id=$(flux batch add-brokers.sh) &&
298+ flux job wait-event $id clean &&
299+ test_debug "cat add-brokers.err" &&
300+ test_debug "cat add-brokers.out" &&
301+ test_cmp add-brokers.expected add-brokers.out
302+ '
275303test_done
You can’t perform that action at this time.
0 commit comments