Skip to content

Commit

Permalink
fixup! testsuite: add job-list database tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chu11 committed May 19, 2022
1 parent 167cf0f commit 412f0d7
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions t/t2262-job-list-db.t
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ test_expect_success HAVE_JQ 'flux job list inactive jobs (pre purge)' '
'

test_expect_success HAVE_JQ 'flux job list inactive jobs w/ count (pre purge)' '
count=$(job_list_state_count inactive)
count=$((count - 2))
count=$(job_list_state_count inactive) &&
count=$((count - 2)) &&
flux job list -s inactive -c ${count} | jq .id > listI_count.out &&
head -n ${count} inactive.ids > listI_count.exp &&
test_cmp listI_count.out listI_count.exp
Expand All @@ -231,8 +231,8 @@ test_expect_success HAVE_JQ 'flux job list-inactive jobs (pre purge)' '
'

test_expect_success HAVE_JQ 'flux job list-inactive jobs w/ count (pre purge)' '
count=$(job_list_state_count inactive)
count=$((count - 2))
count=$(job_list_state_count inactive) &&
count=$((count - 2)) &&
flux job list-inactive -c ${count} | jq .id > list_inactive_count.out &&
head -n ${count} inactive.ids > list_inactive_count.exp &&
test_cmp list_inactive_count.out list_inactive_count.exp
Expand Down Expand Up @@ -292,8 +292,8 @@ test_expect_success HAVE_JQ 'flux job list inactive jobs (post purge)' '
'

test_expect_success HAVE_JQ 'flux job list inactive jobs w/ count (post purge)' '
count=$(cat inactive.ids.orig | wc -l)
count=$((count - 2))
count=$(cat inactive.ids.orig | wc -l) &&
count=$((count - 2)) &&
flux job list -s inactive -c ${count} | jq .id > listI_count2.out &&
head -n ${count} inactive.ids.orig > listI_count2.exp &&
test_cmp listI_count2.out listI_count2.exp
Expand All @@ -305,8 +305,8 @@ test_expect_success HAVE_JQ 'flux job list-inactive jobs (post purge)' '
'

test_expect_success HAVE_JQ 'flux job list-inactive jobs w/ count (post purge)' '
count=$(cat inactive.ids.orig | wc -l)
count=$((count - 2))
count=$(cat inactive.ids.orig | wc -l) &&
count=$((count - 2)) &&
flux job list-inactive -c ${count} | jq .id > list_inactive_count2.out &&
head -n ${count} inactive.ids.orig > list_inactive_count2.exp &&
test_cmp list_inactive_count2.out list_inactive_count2.exp
Expand All @@ -332,8 +332,8 @@ test_expect_success HAVE_JQ 'flux job list inactive jobs (all purge)' '
'

test_expect_success HAVE_JQ 'flux job list inactive jobs w/ count (all purge)' '
count=$(cat inactive.ids.orig | wc -l)
count=$((count - 2))
count=$(cat inactive.ids.orig | wc -l) &&
count=$((count - 2)) &&
flux job list -s inactive -c ${count} | jq .id > listI_count3.out &&
head -n ${count} inactive.ids.orig > listI_count3.exp &&
test_cmp listI_count3.out listI_count3.exp
Expand All @@ -345,8 +345,8 @@ test_expect_success HAVE_JQ 'flux job list-inactive jobs (all purge)' '
'

test_expect_success HAVE_JQ 'flux job list-inactive jobs w/ count (all purge)' '
count=$(cat inactive.ids.orig | wc -l)
count=$((count - 2))
count=$(cat inactive.ids.orig | wc -l) &&
count=$((count - 2)) &&
flux job list-inactive -c ${count} | jq .id > list_inactive_count3.out &&
head -n ${count} inactive.ids.orig > list_inactive_count3.exp &&
test_cmp list_inactive_count3.out list_inactive_count3.exp
Expand Down

0 comments on commit 412f0d7

Please sign in to comment.