Skip to content

Commit

Permalink
t: add tests for combining --tree, --fields
Browse files Browse the repository at this point in the history
Problem: The view-bank command does not support the combination of both
--tree and --fields, but there is no check for this in the testsuite.

Add a test in t1023-flux-account-banks.t that makes sure the
appropriate error message is raised when combining both --tree and
--fields.
  • Loading branch information
cmoussa1 committed Nov 26, 2024
1 parent 6e95300 commit 3ae8630
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions t/t1023-flux-account-banks.t
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ test_expect_success 'call list-banks with a bad field' '
grep "invalid fields: foo" error.out
'

test_expect_success 'combining --tree with --fields does not work' '
test_must_fail flux account view-bank root --tree --fields=bank_id > error.out 2>&1 &&
grep "tree option does not support custom formatting" error.out
'

test_expect_success 'remove flux-accounting DB' '
rm $(pwd)/FluxAccountingTest.db
'
Expand Down

0 comments on commit 3ae8630

Please sign in to comment.