Skip to content

Commit

Permalink
testsuite: test the flux --root option
Browse files Browse the repository at this point in the history
Problem: There are no tests of the `flux --root` option.

Add some tests to t3100-flux-in-flux.t.
  • Loading branch information
grondo committed Jan 16, 2025
1 parent e06e821 commit a4a568c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions t/t3100-flux-in-flux.t
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ test_expect_success "flux --parent --parent works in subinstance" '
test_cmp guest2.test.exp guest2.test
'

test_expect_success "flux --root works in subinstance" '
id=$(flux batch -n1 --wrap \
flux run flux start ${ARGS} \
flux --root getattr instance-level) &&
flux job wait-event -vt 30 $id clean &&
test_debug "cat flux-${id}.out" &&
test "$(cat flux-${id}.out)" -eq 0
'

test_expect_success 'flux --root returns current instance at depth 0' '
test $(flux --root getattr instance-level) -eq 0
'

test_expect_success "instance-level attribute = 0 in new standalone instance" '
flux start ${ARGS} flux getattr instance-level >level_new.out &&
echo 0 >level_new.exp &&
Expand Down

0 comments on commit a4a568c

Please sign in to comment.