Skip to content

Commit

Permalink
t: edit expected output of view-job-records
Browse files Browse the repository at this point in the history
Problem: The output of the view-job-records command has been slightly
adjusted as a result of including custom formatting in its output, but
there are a couple of tests throughout the testsuite that are now
out-of-date because they look for the old format.

Adjust the tests that look for view-job-records output throughout the
testsuite to account for the new formatting. Get rid of a expected file
in the testsuite in favor of just creating that file within the test
itself.
  • Loading branch information
cmoussa1 committed Jan 27, 2025
1 parent da13428 commit afb3b61
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion t/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ EXTRA_DIST= \
expected/flux_account/F_bank_users.expected \
expected/pop_db/db_hierarchy_base.expected \
expected/pop_db/db_hierarchy_new_users.expected \
expected/job_usage/no_jobs.expected \
expected/sample_payloads/same_fairshare.json \
expected/sample_payloads/small_no_tie.json \
expected/sample_payloads/small_tie_all.json \
Expand Down
1 change: 0 additions & 1 deletion t/expected/job_usage/no_jobs.expected

This file was deleted.

5 changes: 4 additions & 1 deletion t/t1011-job-archive-interface.t
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ test_expect_success 'check that usage does not get affected by canceled jobs' '

test_expect_success 'check that no jobs show up under user' '
flux account -p ${DB_PATH} view-job-records --user $username > no_jobs.test &&
test_cmp ${NO_JOBS} no_jobs.test
cat <<-EOF >no_jobs.expected &&
userid username jobid t_submit t_run t_inactive nnodes project bank
EOF
test_cmp no_jobs.expected no_jobs.test
'

test_expect_success 'submit some jobs and wait for them to finish running' '
Expand Down
3 changes: 2 additions & 1 deletion t/t1041-view-jobs-by-project.t
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ test_expect_success 'run fetch-job-records script' '

test_expect_success 'look at all jobs (will show 4 records)' '
flux account view-job-records > all_jobs.out &&
test $(grep -c "project" all_jobs.out) -eq 4
test $(grep -c "projectA" all_jobs.out) -eq 2 &&
test $(grep -c "projectB" all_jobs.out) -eq 2
'

test_expect_success 'filter jobs by projectA (will show 2 records)' '
Expand Down

0 comments on commit afb3b61

Please sign in to comment.