Skip to content

Commit

Permalink
t: change which user is deleted from table
Browse files Browse the repository at this point in the history
Problem: There is a test in t1023-flux-account-banks.t that makes sure
the default bank of a user is updated when one of their user/bank rows
is deleted from the database by removing it in the test prior, but the
wrong user is deleted.

Change which user is deleted in t1023-flux-account-banks.t.
  • Loading branch information
cmoussa1 committed Nov 6, 2024
1 parent cf90811 commit bf976aa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions t/t1023-flux-account-banks.t
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,15 @@ test_expect_success 'add a user to two different banks' '
'

test_expect_success 'delete user default bank row' '
flux account delete-user user5013 E
flux account delete-user user5015 E
'

test_expect_success 'check that user default bank gets updated to other bank' '
flux account view-user user5015 > new_default_bank.out &&
cat new_default_bank.out &&
grep -w "username: user5015\|bank: F\|default_bank: F" new_default_bank.out
grep "\"username\": \"user5015\"" new_default_bank.out
grep "\"bank\": \"F\"" new_default_bank.out &&
grep "\"default_bank\": \"F\"" new_default_bank.out
'

test_expect_success 'trying to add a user to a nonexistent bank should raise a ValueError' '
Expand Down

0 comments on commit bf976aa

Please sign in to comment.