Skip to content

Commit

Permalink
t: test cli handling of double declared shell option
Browse files Browse the repository at this point in the history
Problem: There is no test that ensures that `flux alloc -o foo
-o foo.bar=hi` returns an error message that is useful to an end
user.

Add such a test.
  • Loading branch information
wihobbs committed Mar 3, 2025
1 parent 7c6746e commit 1476d28
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions t/t2712-python-cli-alloc.t
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ test_expect_success 'flux alloc: mpi option can be overridden' '
flux alloc -o mpi=foo -N1 --dry-run hostname | \
jq -e ".attributes.system.shell.options.mpi = \"foo\""
'
test_expect_success 'flux alloc: -o foo.bar cannot override -o foo' '
test_must_fail flux alloc -o foo -N1 -o foo.bar=hi --dry-run hostname >shellopt.out 2>&1 &&
test_debug "cat shellopt.out" &&
grep "failed to set shell option foo.bar to hi" shellopt.out
'

test_expect_success 'flux alloc: MPI vars are not set in initial program' '
flux queue start &&
unset OMPI_MCA_pmix &&
Expand Down

0 comments on commit 1476d28

Please sign in to comment.