Skip to content

Commit 5c917d3

Browse files
committed
add limit teset
1 parent 8717df8 commit 5c917d3

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

coderd/provisionerjobs_test.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ func TestProvisionerJobs(t *testing.T) {
6363
TemplateVersionID: version.ID,
6464
})
6565

66+
// Add more jobs than the default limit.
67+
for range 60 {
68+
dbgen.ProvisionerJob(t, db, nil, database.ProvisionerJob{
69+
OrganizationID: owner.OrganizationID,
70+
})
71+
}
72+
6673
t.Run("Single", func(t *testing.T) {
6774
t.Parallel()
6875
t.Run("OK", func(t *testing.T) {
@@ -82,12 +89,12 @@ func TestProvisionerJobs(t *testing.T) {
8289
})
8390
})
8491

85-
t.Run("All", func(t *testing.T) {
92+
t.Run("Default limit", func(t *testing.T) {
8693
t.Parallel()
8794
ctx := testutil.Context(t, testutil.WaitMedium)
8895
jobs, err := templateAdminClient.OrganizationProvisionerJobs(ctx, owner.OrganizationID, nil)
8996
require.NoError(t, err)
90-
require.Len(t, jobs, 3)
97+
require.Len(t, jobs, 50)
9198
})
9299

93100
t.Run("Status", func(t *testing.T) {

0 commit comments

Comments
 (0)