@@ -1715,7 +1715,7 @@ func (s *MethodTestSuite) TestUser() {
1715
1715
check .Args (database.DeleteCustomRoleParams {
1716
1716
Name : customRole .Name ,
1717
1717
}).Asserts (
1718
- // fails immediately, missing organization id
1718
+ // fails immediately, missing organization id
1719
1719
).Errors (dbauthz.NotAuthorizedError {Err : xerrors .New ("custom roles must belong to an organization" )})
1720
1720
}))
1721
1721
s .Run ("Blank/UpdateCustomRole" , s .Subtest (func (db database.Store , check * expects ) {
@@ -1746,7 +1746,7 @@ func (s *MethodTestSuite) TestUser() {
1746
1746
codersdk .ResourceWorkspace : {codersdk .ActionRead },
1747
1747
}), convertSDKPerm ),
1748
1748
}).Asserts (
1749
- // fails immediately, missing organization id
1749
+ // fails immediately, missing organization id
1750
1750
).Errors (dbauthz.NotAuthorizedError {Err : xerrors .New ("custom roles must belong to an organization" )})
1751
1751
}))
1752
1752
s .Run ("OrgPermissions/UpdateCustomRole" , s .Subtest (func (db database.Store , check * expects ) {
@@ -1799,7 +1799,7 @@ func (s *MethodTestSuite) TestUser() {
1799
1799
codersdk .ResourceWorkspace : {codersdk .ActionRead },
1800
1800
}), convertSDKPerm ),
1801
1801
}).Asserts (
1802
- // fails immediately, missing organization id
1802
+ // fails immediately, missing organization id
1803
1803
).Errors (dbauthz.NotAuthorizedError {Err : xerrors .New ("custom roles must belong to an organization" )})
1804
1804
}))
1805
1805
s .Run ("OrgPermissions/InsertCustomRole" , s .Subtest (func (db database.Store , check * expects ) {
@@ -3810,7 +3810,7 @@ func (s *MethodTestSuite) TestSystemFunctions() {
3810
3810
s .Run ("GetProvisionerJobsCreatedAfter" , s .Subtest (func (db database.Store , check * expects ) {
3811
3811
// TODO: add provisioner job resource type
3812
3812
_ = 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*/ )
3814
3814
}))
3815
3815
s .Run ("GetTemplateVersionsByIDs" , s .Subtest (func (db database.Store , check * expects ) {
3816
3816
dbtestutil .DisableForeignKeysAndTriggers (s .T (), db )
@@ -3987,7 +3987,7 @@ func (s *MethodTestSuite) TestSystemFunctions() {
3987
3987
a := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
3988
3988
b := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
3989
3989
check .Args ([]uuid.UUID {a .ID , b .ID }).
3990
- Asserts ( /*rbac.ResourceSystem, policy.ActionRead*/ ).
3990
+ Asserts ( /*rbac.ResourceSystem, policy.ActionRead*/ ).
3991
3991
Returns (slice .New (a , b ))
3992
3992
}))
3993
3993
s .Run ("InsertWorkspaceAgent" , s .Subtest (func (db database.Store , check * expects ) {
@@ -4032,22 +4032,22 @@ func (s *MethodTestSuite) TestSystemFunctions() {
4032
4032
OrganizationID : j .OrganizationID ,
4033
4033
Types : []database.ProvisionerType {j .Provisioner },
4034
4034
ProvisionerTags : must (json .Marshal (j .Tags )),
4035
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4035
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4036
4036
}))
4037
4037
s .Run ("UpdateProvisionerJobWithCompleteByID" , s .Subtest (func (db database.Store , check * expects ) {
4038
4038
// TODO: we need to create a ProvisionerJob resource
4039
4039
j := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
4040
4040
check .Args (database.UpdateProvisionerJobWithCompleteByIDParams {
4041
4041
ID : j .ID ,
4042
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4042
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4043
4043
}))
4044
4044
s .Run ("UpdateProvisionerJobByID" , s .Subtest (func (db database.Store , check * expects ) {
4045
4045
// TODO: we need to create a ProvisionerJob resource
4046
4046
j := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
4047
4047
check .Args (database.UpdateProvisionerJobByIDParams {
4048
4048
ID : j .ID ,
4049
4049
UpdatedAt : time .Now (),
4050
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4050
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4051
4051
}))
4052
4052
s .Run ("InsertProvisionerJob" , s .Subtest (func (db database.Store , check * expects ) {
4053
4053
dbtestutil .DisableForeignKeysAndTriggers (s .T (), db )
@@ -4058,21 +4058,21 @@ func (s *MethodTestSuite) TestSystemFunctions() {
4058
4058
StorageMethod : database .ProvisionerStorageMethodFile ,
4059
4059
Type : database .ProvisionerJobTypeWorkspaceBuild ,
4060
4060
Input : json .RawMessage ("{}" ),
4061
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4061
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4062
4062
}))
4063
4063
s .Run ("InsertProvisionerJobLogs" , s .Subtest (func (db database.Store , check * expects ) {
4064
4064
// TODO: we need to create a ProvisionerJob resource
4065
4065
j := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
4066
4066
check .Args (database.InsertProvisionerJobLogsParams {
4067
4067
JobID : j .ID ,
4068
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4068
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4069
4069
}))
4070
4070
s .Run ("InsertProvisionerJobTimings" , s .Subtest (func (db database.Store , check * expects ) {
4071
4071
// TODO: we need to create a ProvisionerJob resource
4072
4072
j := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
4073
4073
check .Args (database.InsertProvisionerJobTimingsParams {
4074
4074
JobID : j .ID ,
4075
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4075
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4076
4076
}))
4077
4077
s .Run ("UpsertProvisionerDaemon" , s .Subtest (func (db database.Store , check * expects ) {
4078
4078
dbtestutil .DisableForeignKeysAndTriggers (s .T (), db )
0 commit comments