@@ -3,19 +3,22 @@ package acl_test
3
3
import (
4
4
"testing"
5
5
6
+ "github.com/google/uuid"
7
+ "github.com/stretchr/testify/require"
8
+
6
9
"github.com/coder/coder/v2/coderd"
7
10
"github.com/coder/coder/v2/coderd/database"
8
11
"github.com/coder/coder/v2/coderd/database/dbgen"
9
12
"github.com/coder/coder/v2/coderd/database/dbtestutil"
10
13
"github.com/coder/coder/v2/coderd/rbac/acl"
11
14
"github.com/coder/coder/v2/codersdk"
12
15
"github.com/coder/coder/v2/testutil"
13
- "github.com/google/uuid"
14
- "github.com/stretchr/testify/require"
15
16
)
16
17
17
18
func TestOK (t * testing.T ) {
18
- db , _ := dbtestutil .NewDB (t , dbtestutil .WithTimezone ("UTC" ))
19
+ t .Parallel ()
20
+
21
+ db , _ := dbtestutil .NewDB (t )
19
22
o := dbgen .Organization (t , db , database.Organization {})
20
23
g := dbgen .Group (t , db , database.Group {OrganizationID : o .ID })
21
24
u := dbgen .User (t , db , database.User {})
@@ -40,7 +43,9 @@ func TestOK(t *testing.T) {
40
43
}
41
44
42
45
func TestDeniesUnknownIDs (t * testing.T ) {
43
- db , _ := dbtestutil .NewDB (t , dbtestutil .WithTimezone ("UTC" ))
46
+ t .Parallel ()
47
+
48
+ db , _ := dbtestutil .NewDB (t )
44
49
ctx := testutil .Context (t , testutil .WaitShort )
45
50
46
51
update := codersdk.UpdateWorkspaceACL {
@@ -60,7 +65,9 @@ func TestDeniesUnknownIDs(t *testing.T) {
60
65
}
61
66
62
67
func TestDeniesUnknownRolesAndInvalidIDs (t * testing.T ) {
63
- db , _ := dbtestutil .NewDB (t , dbtestutil .WithTimezone ("UTC" ))
68
+ t .Parallel ()
69
+
70
+ db , _ := dbtestutil .NewDB (t )
64
71
ctx := testutil .Context (t , testutil .WaitShort )
65
72
66
73
update := codersdk.UpdateWorkspaceACL {
0 commit comments