We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentebea5ba commit18f6bbfCopy full SHA for 18f6bbf
coderd/database/querier_test.go
@@ -516,6 +516,29 @@ func TestDefaultOrg(t *testing.T) {
516
require.True(t,all[0].IsDefault,"first org should always be default")
517
}
518
519
+funcTestAuditLogDefaultLimit(t*testing.T) {
520
+t.Parallel()
521
+iftesting.Short() {
522
+t.SkipNow()
523
+}
524
+
525
+sqlDB:=testSQLDB(t)
526
+err:=migrations.Up(sqlDB)
527
+require.NoError(t,err)
528
+db:=database.New(sqlDB)
529
530
+fori:=0;i<110;i++ {
531
+dbgen.AuditLog(t,db, database.AuditLog{})
532
533
534
+ctx:=testutil.Context(t,testutil.WaitShort)
535
+rows,err:=db.GetAuditLogsOffset(ctx, database.GetAuditLogsOffsetParams{})
536
537
+// The length should match the default limit of the SQL query.
538
+// Updating the sql query requires changing the number below to match.
539
+require.Len(t,rows,100)
540
541
542
// TestReadCustomRoles tests the input params returns the correct set of roles.
543
funcTestReadCustomRoles(t*testing.T) {
544
t.Parallel()