Skip to content

Commit e189a0b

Browse files
fix: fix linter
1 parent 7b9c8ce commit e189a0b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

coderd/database/dbauthz/dbauthz_test.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -1715,7 +1715,7 @@ func (s *MethodTestSuite) TestUser() {
17151715
check.Args(database.DeleteCustomRoleParams{
17161716
Name: customRole.Name,
17171717
}).Asserts(
1718-
// fails immediately, missing organization id
1718+
// fails immediately, missing organization id
17191719
).Errors(dbauthz.NotAuthorizedError{Err: xerrors.New("custom roles must belong to an organization")})
17201720
}))
17211721
s.Run("Blank/UpdateCustomRole", s.Subtest(func(db database.Store, check *expects) {
@@ -1746,7 +1746,7 @@ func (s *MethodTestSuite) TestUser() {
17461746
codersdk.ResourceWorkspace: {codersdk.ActionRead},
17471747
}), convertSDKPerm),
17481748
}).Asserts(
1749-
// fails immediately, missing organization id
1749+
// fails immediately, missing organization id
17501750
).Errors(dbauthz.NotAuthorizedError{Err: xerrors.New("custom roles must belong to an organization")})
17511751
}))
17521752
s.Run("OrgPermissions/UpdateCustomRole", s.Subtest(func(db database.Store, check *expects) {
@@ -1799,7 +1799,7 @@ func (s *MethodTestSuite) TestUser() {
17991799
codersdk.ResourceWorkspace: {codersdk.ActionRead},
18001800
}), convertSDKPerm),
18011801
}).Asserts(
1802-
// fails immediately, missing organization id
1802+
// fails immediately, missing organization id
18031803
).Errors(dbauthz.NotAuthorizedError{Err: xerrors.New("custom roles must belong to an organization")})
18041804
}))
18051805
s.Run("OrgPermissions/InsertCustomRole", s.Subtest(func(db database.Store, check *expects) {
@@ -3810,7 +3810,7 @@ func (s *MethodTestSuite) TestSystemFunctions() {
38103810
s.Run("GetProvisionerJobsCreatedAfter", s.Subtest(func(db database.Store, check *expects) {
38113811
// TODO: add provisioner job resource type
38123812
_ = dbgen.ProvisionerJob(s.T(), db, nil, database.ProvisionerJob{CreatedAt: time.Now().Add(-time.Hour)})
3813-
check.Args(time.Now()).Asserts( /*rbac.ResourceSystem, policy.ActionRead*/)
3813+
check.Args(time.Now()).Asserts( /*rbac.ResourceSystem, policy.ActionRead*/ )
38143814
}))
38153815
s.Run("GetTemplateVersionsByIDs", s.Subtest(func(db database.Store, check *expects) {
38163816
dbtestutil.DisableForeignKeysAndTriggers(s.T(), db)
@@ -3987,7 +3987,7 @@ func (s *MethodTestSuite) TestSystemFunctions() {
39873987
a := dbgen.ProvisionerJob(s.T(), db, nil, database.ProvisionerJob{})
39883988
b := dbgen.ProvisionerJob(s.T(), db, nil, database.ProvisionerJob{})
39893989
check.Args([]uuid.UUID{a.ID, b.ID}).
3990-
Asserts( /*rbac.ResourceSystem, policy.ActionRead*/).
3990+
Asserts( /*rbac.ResourceSystem, policy.ActionRead*/ ).
39913991
Returns(slice.New(a, b))
39923992
}))
39933993
s.Run("InsertWorkspaceAgent", s.Subtest(func(db database.Store, check *expects) {
@@ -4032,22 +4032,22 @@ func (s *MethodTestSuite) TestSystemFunctions() {
40324032
OrganizationID: j.OrganizationID,
40334033
Types: []database.ProvisionerType{j.Provisioner},
40344034
ProvisionerTags: must(json.Marshal(j.Tags)),
4035-
}).Asserts( /*rbac.ResourceSystem, policy.ActionUpdate*/)
4035+
}).Asserts( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
40364036
}))
40374037
s.Run("UpdateProvisionerJobWithCompleteByID", 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.UpdateProvisionerJobWithCompleteByIDParams{
40414041
ID: j.ID,
4042-
}).Asserts( /*rbac.ResourceSystem, policy.ActionUpdate*/)
4042+
}).Asserts( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
40434043
}))
40444044
s.Run("UpdateProvisionerJobByID", s.Subtest(func(db database.Store, check *expects) {
40454045
// TODO: we need to create a ProvisionerJob resource
40464046
j := dbgen.ProvisionerJob(s.T(), db, nil, database.ProvisionerJob{})
40474047
check.Args(database.UpdateProvisionerJobByIDParams{
40484048
ID: j.ID,
40494049
UpdatedAt: time.Now(),
4050-
}).Asserts( /*rbac.ResourceSystem, policy.ActionUpdate*/)
4050+
}).Asserts( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
40514051
}))
40524052
s.Run("InsertProvisionerJob", s.Subtest(func(db database.Store, check *expects) {
40534053
dbtestutil.DisableForeignKeysAndTriggers(s.T(), db)
@@ -4058,21 +4058,21 @@ func (s *MethodTestSuite) TestSystemFunctions() {
40584058
StorageMethod: database.ProvisionerStorageMethodFile,
40594059
Type: database.ProvisionerJobTypeWorkspaceBuild,
40604060
Input: json.RawMessage("{}"),
4061-
}).Asserts( /*rbac.ResourceSystem, policy.ActionCreate*/)
4061+
}).Asserts( /*rbac.ResourceSystem, policy.ActionCreate*/ )
40624062
}))
40634063
s.Run("InsertProvisionerJobLogs", 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.InsertProvisionerJobLogsParams{
40674067
JobID: j.ID,
4068-
}).Asserts( /*rbac.ResourceSystem, policy.ActionCreate*/)
4068+
}).Asserts( /*rbac.ResourceSystem, policy.ActionCreate*/ )
40694069
}))
40704070
s.Run("InsertProvisionerJobTimings", s.Subtest(func(db database.Store, check *expects) {
40714071
// TODO: we need to create a ProvisionerJob resource
40724072
j := dbgen.ProvisionerJob(s.T(), db, nil, database.ProvisionerJob{})
40734073
check.Args(database.InsertProvisionerJobTimingsParams{
40744074
JobID: j.ID,
4075-
}).Asserts( /*rbac.ResourceSystem, policy.ActionCreate*/)
4075+
}).Asserts( /*rbac.ResourceSystem, policy.ActionCreate*/ )
40764076
}))
40774077
s.Run("UpsertProvisionerDaemon", s.Subtest(func(db database.Store, check *expects) {
40784078
dbtestutil.DisableForeignKeysAndTriggers(s.T(), db)

0 commit comments

Comments
 (0)