Skip to content

Commit

Permalink
t: drop --json from view-user calls
Browse files Browse the repository at this point in the history
Problem: There are a few tests in the sharness testsuite that pass
--json when calling view-user, but this optional argument is no longer
valid as the default output of view-user is in JSON.

Adjust the view-user --json calls in the testsuite to account for the
removal of --json.
  • Loading branch information
cmoussa1 committed Nov 6, 2024
1 parent e5ef756 commit 9178cac
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
5 changes: 0 additions & 5 deletions t/t1007-flux-account-users.t
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ test_expect_success 'view some user information with --parsable' '
grep -w "user5011\|5011\|A" user_info_parsable.out
'

test_expect_success 'view some user information with --json' '
flux account view-user --json user5014 > user_info_json.out &&
grep -w "\"username\": \"user5014\"\|\"userid\": 5014\|\"bank\": \"C\"" user_info_json.out
'

test_expect_success 'edit a userid for a user' '
flux account edit-user user5011 --userid=12345 &&
flux account view-user user5011 > edit_userid.out &&
Expand Down
12 changes: 6 additions & 6 deletions t/t1011-job-archive-interface.t
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ test_expect_success 'run scripts to update job usage and fair-share' '
'

test_expect_success 'check that usage does not get affected by canceled jobs' '
flux account view-user --json $username > user.json &&
flux account view-user $username > user.json &&
test_debug "jq -S . <user.json" &&
jq -e ".banks[0].job_usage == 0.0" <user.json
jq -e ".[0].job_usage == 0.0" <user.json
'

test_expect_success 'check that no jobs show up under user' '
Expand Down Expand Up @@ -133,9 +133,9 @@ test_expect_success 'run update-usage and update-fshare commands' '
'

test_expect_success 'check that job usage and fairshare values get updated' '
flux account -p ${DB_PATH} view-user $username --json > query1.json &&
flux account -p ${DB_PATH} view-user $username > query1.json &&
test_debug "jq -S . <query1.json" &&
jq -e ".banks[1].job_usage >= 4" <query1.json
jq -e ".[1].job_usage >= 4" <query1.json
'

# if update-usage is called in the same half-life period when no jobs are found
Expand All @@ -144,9 +144,9 @@ test_expect_success 'check that job usage and fairshare values get updated' '
test_expect_success 'call update-usage in the same half-life period where no jobs are run' '
flux account -p ${DB_PATH} update-usage &&
flux account-update-fshare -p ${DB_PATH} &&
flux account -p ${DB_PATH} view-user $username --json > query2.json &&
flux account -p ${DB_PATH} view-user $username > query2.json &&
test_debug "jq -S . <query2.json" &&
jq -e ".banks[1].job_usage >= 4" <query2.json
jq -e ".[1].job_usage >= 4" <query2.json
'

test_expect_success 'remove flux-accounting DB' '
Expand Down
2 changes: 1 addition & 1 deletion t/t1025-flux-account-projects.t
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ test_expect_success 'edit the default project of a user' '

test_expect_success 'reset the projects list for an association' '
flux account edit-user user5018 --projects=-1 &&
flux account view-user user5018 --json > user5018.json &&
flux account view-user user5018 > user5018.json &&
grep "\"projects\": \"*\"" user5018.json
'

Expand Down

0 comments on commit 9178cac

Please sign in to comment.