@@ -2037,7 +2037,6 @@ func TestAuthorizedAuditLogs(t *testing.T) {
2037
2037
}
2038
2038
2039
2039
// Now fetch all the logs
2040
- ctx := testutil .Context (t , testutil .WaitLong )
2041
2040
auditorRole , err := rbac .RoleByName (rbac .RoleAuditor ())
2042
2041
require .NoError (t , err )
2043
2042
@@ -2054,6 +2053,7 @@ func TestAuthorizedAuditLogs(t *testing.T) {
2054
2053
2055
2054
t .Run ("NoAccess" , func (t * testing.T ) {
2056
2055
t .Parallel ()
2056
+ ctx := testutil .Context (t , testutil .WaitShort )
2057
2057
2058
2058
// Given: A user who is a member of 0 organizations
2059
2059
memberCtx := dbauthz .As (ctx , rbac.Subject {
@@ -2076,6 +2076,7 @@ func TestAuthorizedAuditLogs(t *testing.T) {
2076
2076
2077
2077
t .Run ("SiteWideAuditor" , func (t * testing.T ) {
2078
2078
t .Parallel ()
2079
+ ctx := testutil .Context (t , testutil .WaitShort )
2079
2080
2080
2081
// Given: A site wide auditor
2081
2082
siteAuditorCtx := dbauthz .As (ctx , rbac.Subject {
@@ -2098,6 +2099,7 @@ func TestAuthorizedAuditLogs(t *testing.T) {
2098
2099
2099
2100
t .Run ("SingleOrgAuditor" , func (t * testing.T ) {
2100
2101
t .Parallel ()
2102
+ ctx := testutil .Context (t , testutil .WaitShort )
2101
2103
2102
2104
orgID := orgIDs [0 ]
2103
2105
// Given: An organization scoped auditor
@@ -2121,6 +2123,7 @@ func TestAuthorizedAuditLogs(t *testing.T) {
2121
2123
2122
2124
t .Run ("TwoOrgAuditors" , func (t * testing.T ) {
2123
2125
t .Parallel ()
2126
+ ctx := testutil .Context (t , testutil .WaitShort )
2124
2127
2125
2128
first := orgIDs [0 ]
2126
2129
second := orgIDs [1 ]
@@ -2147,6 +2150,7 @@ func TestAuthorizedAuditLogs(t *testing.T) {
2147
2150
2148
2151
t .Run ("ErroneousOrg" , func (t * testing.T ) {
2149
2152
t .Parallel ()
2153
+ ctx := testutil .Context (t , testutil .WaitShort )
2150
2154
2151
2155
// Given: A user who is an auditor for an organization that has 0 logs
2152
2156
userCtx := dbauthz .As (ctx , rbac.Subject {
@@ -2232,7 +2236,6 @@ func TestGetAuthorizedConnectionLogsOffset(t *testing.T) {
2232
2236
}
2233
2237
2234
2238
// Now fetch all the logs
2235
- ctx := testutil .Context (t , testutil .WaitLong )
2236
2239
auditorRole , err := rbac .RoleByName (rbac .RoleAuditor ())
2237
2240
require .NoError (t , err )
2238
2241
@@ -2249,6 +2252,7 @@ func TestGetAuthorizedConnectionLogsOffset(t *testing.T) {
2249
2252
2250
2253
t .Run ("NoAccess" , func (t * testing.T ) {
2251
2254
t .Parallel ()
2255
+ ctx := testutil .Context (t , testutil .WaitLong )
2252
2256
2253
2257
// Given: A user who is a member of 0 organizations
2254
2258
memberCtx := dbauthz .As (ctx , rbac.Subject {
@@ -2271,6 +2275,7 @@ func TestGetAuthorizedConnectionLogsOffset(t *testing.T) {
2271
2275
2272
2276
t .Run ("SiteWideAuditor" , func (t * testing.T ) {
2273
2277
t .Parallel ()
2278
+ ctx := testutil .Context (t , testutil .WaitLong )
2274
2279
2275
2280
// Given: A site wide auditor
2276
2281
siteAuditorCtx := dbauthz .As (ctx , rbac.Subject {
@@ -2293,6 +2298,7 @@ func TestGetAuthorizedConnectionLogsOffset(t *testing.T) {
2293
2298
2294
2299
t .Run ("SingleOrgAuditor" , func (t * testing.T ) {
2295
2300
t .Parallel ()
2301
+ ctx := testutil .Context (t , testutil .WaitLong )
2296
2302
2297
2303
orgID := orgIDs [0 ]
2298
2304
// Given: An organization scoped auditor
@@ -2316,6 +2322,7 @@ func TestGetAuthorizedConnectionLogsOffset(t *testing.T) {
2316
2322
2317
2323
t .Run ("TwoOrgAuditors" , func (t * testing.T ) {
2318
2324
t .Parallel ()
2325
+ ctx := testutil .Context (t , testutil .WaitLong )
2319
2326
2320
2327
first := orgIDs [0 ]
2321
2328
second := orgIDs [1 ]
@@ -2340,6 +2347,7 @@ func TestGetAuthorizedConnectionLogsOffset(t *testing.T) {
2340
2347
2341
2348
t .Run ("ErroneousOrg" , func (t * testing.T ) {
2342
2349
t .Parallel ()
2350
+ ctx := testutil .Context (t , testutil .WaitLong )
2343
2351
2344
2352
// Given: A user who is an auditor for an organization that has 0 logs
2345
2353
userCtx := dbauthz .As (ctx , rbac.Subject {
@@ -2421,7 +2429,6 @@ func TestCountConnectionLogs(t *testing.T) {
2421
2429
2422
2430
func TestConnectionLogsOffsetFilters (t * testing.T ) {
2423
2431
t .Parallel ()
2424
- ctx := testutil .Context (t , testutil .WaitLong )
2425
2432
2426
2433
db , _ := dbtestutil .NewDB (t )
2427
2434
@@ -2652,9 +2659,9 @@ func TestConnectionLogsOffsetFilters(t *testing.T) {
2652
2659
}
2653
2660
2654
2661
for _ , tc := range testCases {
2655
- tc := tc
2656
2662
t .Run (tc .name , func (t * testing.T ) {
2657
2663
t .Parallel ()
2664
+ ctx := testutil .Context (t , testutil .WaitLong )
2658
2665
logs , err := db .GetConnectionLogsOffset (ctx , tc .params )
2659
2666
require .NoError (t , err )
2660
2667
count , err := db .CountConnectionLogs (ctx , database.CountConnectionLogsParams {
0 commit comments