Skip to content

Commit 926a5d1

Browse files
make fmt
1 parent 8688e0e commit 926a5d1

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

coderd/database/dbauthz/dbauthz_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,7 +1792,7 @@ func (s *MethodTestSuite) TestUser() {
17921792
check.Args(database.DeleteCustomRoleParams{
17931793
Name: customRole.Name,
17941794
}).Asserts(
1795-
// fails immediately, missing organization id
1795+
// fails immediately, missing organization id
17961796
).Errors(dbauthz.NotAuthorizedError{Err: xerrors.New("custom roles must belong to an organization")})
17971797
}))
17981798
s.Run("Blank/UpdateCustomRole", s.Subtest(func(db database.Store, check *expects) {
@@ -1823,7 +1823,7 @@ func (s *MethodTestSuite) TestUser() {
18231823
codersdk.ResourceWorkspace: {codersdk.ActionRead},
18241824
}), convertSDKPerm),
18251825
}).Asserts(
1826-
// fails immediately, missing organization id
1826+
// fails immediately, missing organization id
18271827
).Errors(dbauthz.NotAuthorizedError{Err: xerrors.New("custom roles must belong to an organization")})
18281828
}))
18291829
s.Run("OrgPermissions/UpdateCustomRole", s.Subtest(func(db database.Store, check *expects) {
@@ -1876,7 +1876,7 @@ func (s *MethodTestSuite) TestUser() {
18761876
codersdk.ResourceWorkspace: {codersdk.ActionRead},
18771877
}), convertSDKPerm),
18781878
}).Asserts(
1879-
// fails immediately, missing organization id
1879+
// fails immediately, missing organization id
18801880
).Errors(dbauthz.NotAuthorizedError{Err: xerrors.New("custom roles must belong to an organization")})
18811881
}))
18821882
s.Run("OrgPermissions/InsertCustomRole", s.Subtest(func(db database.Store, check *expects) {
@@ -3893,7 +3893,7 @@ func (s *MethodTestSuite) TestSystemFunctions() {
38933893
s.Run("GetProvisionerJobsCreatedAfter", s.Subtest(func(db database.Store, check *expects) {
38943894
// TODO: add provisioner job resource type
38953895
_ = dbgen.ProvisionerJob(s.T(), db, nil, database.ProvisionerJob{CreatedAt: time.Now().Add(-time.Hour)})
3896-
check.Args(time.Now()).Asserts( /*rbac.ResourceSystem, policy.ActionRead*/)
3896+
check.Args(time.Now()).Asserts( /*rbac.ResourceSystem, policy.ActionRead*/ )
38973897
}))
38983898
s.Run("GetTemplateVersionsByIDs", s.Subtest(func(db database.Store, check *expects) {
38993899
dbtestutil.DisableForeignKeysAndTriggers(s.T(), db)
@@ -3980,7 +3980,7 @@ func (s *MethodTestSuite) TestSystemFunctions() {
39803980
a := dbgen.ProvisionerJob(s.T(), db, nil, database.ProvisionerJob{})
39813981
b := dbgen.ProvisionerJob(s.T(), db, nil, database.ProvisionerJob{})
39823982
check.Args([]uuid.UUID{a.ID, b.ID}).
3983-
Asserts( /*rbac.ResourceSystem, policy.ActionRead*/).
3983+
Asserts( /*rbac.ResourceSystem, policy.ActionRead*/ ).
39843984
Returns(slice.New(a, b))
39853985
}))
39863986
s.Run("InsertWorkspaceAgent", s.Subtest(func(db database.Store, check *expects) {
@@ -4025,22 +4025,22 @@ func (s *MethodTestSuite) TestSystemFunctions() {
40254025
OrganizationID: j.OrganizationID,
40264026
Types: []database.ProvisionerType{j.Provisioner},
40274027
ProvisionerTags: must(json.Marshal(j.Tags)),
4028-
}).Asserts( /*rbac.ResourceSystem, policy.ActionUpdate*/)
4028+
}).Asserts( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
40294029
}))
40304030
s.Run("UpdateProvisionerJobWithCompleteByID", s.Subtest(func(db database.Store, check *expects) {
40314031
// TODO: we need to create a ProvisionerJob resource
40324032
j := dbgen.ProvisionerJob(s.T(), db, nil, database.ProvisionerJob{})
40334033
check.Args(database.UpdateProvisionerJobWithCompleteByIDParams{
40344034
ID: j.ID,
4035-
}).Asserts( /*rbac.ResourceSystem, policy.ActionUpdate*/)
4035+
}).Asserts( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
40364036
}))
40374037
s.Run("UpdateProvisionerJobByID", s.Subtest(func(db database.Store, check *expects) {
40384038
// TODO: we need to create a ProvisionerJob resource
40394039
j := dbgen.ProvisionerJob(s.T(), db, nil, database.ProvisionerJob{})
40404040
check.Args(database.UpdateProvisionerJobByIDParams{
40414041
ID: j.ID,
40424042
UpdatedAt: time.Now(),
4043-
}).Asserts( /*rbac.ResourceSystem, policy.ActionUpdate*/)
4043+
}).Asserts( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
40444044
}))
40454045
s.Run("InsertProvisionerJob", s.Subtest(func(db database.Store, check *expects) {
40464046
dbtestutil.DisableForeignKeysAndTriggers(s.T(), db)
@@ -4051,21 +4051,21 @@ func (s *MethodTestSuite) TestSystemFunctions() {
40514051
StorageMethod: database.ProvisionerStorageMethodFile,
40524052
Type: database.ProvisionerJobTypeWorkspaceBuild,
40534053
Input: json.RawMessage("{}"),
4054-
}).Asserts( /*rbac.ResourceSystem, policy.ActionCreate*/)
4054+
}).Asserts( /*rbac.ResourceSystem, policy.ActionCreate*/ )
40554055
}))
40564056
s.Run("InsertProvisionerJobLogs", s.Subtest(func(db database.Store, check *expects) {
40574057
// TODO: we need to create a ProvisionerJob resource
40584058
j := dbgen.ProvisionerJob(s.T(), db, nil, database.ProvisionerJob{})
40594059
check.Args(database.InsertProvisionerJobLogsParams{
40604060
JobID: j.ID,
4061-
}).Asserts( /*rbac.ResourceSystem, policy.ActionCreate*/)
4061+
}).Asserts( /*rbac.ResourceSystem, policy.ActionCreate*/ )
40624062
}))
40634063
s.Run("InsertProvisionerJobTimings", s.Subtest(func(db database.Store, check *expects) {
40644064
// TODO: we need to create a ProvisionerJob resource
40654065
j := dbgen.ProvisionerJob(s.T(), db, nil, database.ProvisionerJob{})
40664066
check.Args(database.InsertProvisionerJobTimingsParams{
40674067
JobID: j.ID,
4068-
}).Asserts( /*rbac.ResourceSystem, policy.ActionCreate*/)
4068+
}).Asserts( /*rbac.ResourceSystem, policy.ActionCreate*/ )
40694069
}))
40704070
s.Run("UpsertProvisionerDaemon", s.Subtest(func(db database.Store, check *expects) {
40714071
dbtestutil.DisableForeignKeysAndTriggers(s.T(), db)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy