@@ -1792,7 +1792,7 @@ func (s *MethodTestSuite) TestUser() {
1792
1792
check .Args (database.DeleteCustomRoleParams {
1793
1793
Name : customRole .Name ,
1794
1794
}).Asserts (
1795
- // fails immediately, missing organization id
1795
+ // fails immediately, missing organization id
1796
1796
).Errors (dbauthz.NotAuthorizedError {Err : xerrors .New ("custom roles must belong to an organization" )})
1797
1797
}))
1798
1798
s .Run ("Blank/UpdateCustomRole" , s .Subtest (func (db database.Store , check * expects ) {
@@ -1823,7 +1823,7 @@ func (s *MethodTestSuite) TestUser() {
1823
1823
codersdk .ResourceWorkspace : {codersdk .ActionRead },
1824
1824
}), convertSDKPerm ),
1825
1825
}).Asserts (
1826
- // fails immediately, missing organization id
1826
+ // fails immediately, missing organization id
1827
1827
).Errors (dbauthz.NotAuthorizedError {Err : xerrors .New ("custom roles must belong to an organization" )})
1828
1828
}))
1829
1829
s .Run ("OrgPermissions/UpdateCustomRole" , s .Subtest (func (db database.Store , check * expects ) {
@@ -1876,7 +1876,7 @@ func (s *MethodTestSuite) TestUser() {
1876
1876
codersdk .ResourceWorkspace : {codersdk .ActionRead },
1877
1877
}), convertSDKPerm ),
1878
1878
}).Asserts (
1879
- // fails immediately, missing organization id
1879
+ // fails immediately, missing organization id
1880
1880
).Errors (dbauthz.NotAuthorizedError {Err : xerrors .New ("custom roles must belong to an organization" )})
1881
1881
}))
1882
1882
s .Run ("OrgPermissions/InsertCustomRole" , s .Subtest (func (db database.Store , check * expects ) {
@@ -3893,7 +3893,7 @@ func (s *MethodTestSuite) TestSystemFunctions() {
3893
3893
s .Run ("GetProvisionerJobsCreatedAfter" , s .Subtest (func (db database.Store , check * expects ) {
3894
3894
// TODO: add provisioner job resource type
3895
3895
_ = 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*/ )
3897
3897
}))
3898
3898
s .Run ("GetTemplateVersionsByIDs" , s .Subtest (func (db database.Store , check * expects ) {
3899
3899
dbtestutil .DisableForeignKeysAndTriggers (s .T (), db )
@@ -3980,7 +3980,7 @@ func (s *MethodTestSuite) TestSystemFunctions() {
3980
3980
a := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
3981
3981
b := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
3982
3982
check .Args ([]uuid.UUID {a .ID , b .ID }).
3983
- Asserts ( /*rbac.ResourceSystem, policy.ActionRead*/ ).
3983
+ Asserts ( /*rbac.ResourceSystem, policy.ActionRead*/ ).
3984
3984
Returns (slice .New (a , b ))
3985
3985
}))
3986
3986
s .Run ("InsertWorkspaceAgent" , s .Subtest (func (db database.Store , check * expects ) {
@@ -4025,22 +4025,22 @@ func (s *MethodTestSuite) TestSystemFunctions() {
4025
4025
OrganizationID : j .OrganizationID ,
4026
4026
Types : []database.ProvisionerType {j .Provisioner },
4027
4027
ProvisionerTags : must (json .Marshal (j .Tags )),
4028
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4028
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4029
4029
}))
4030
4030
s .Run ("UpdateProvisionerJobWithCompleteByID" , s .Subtest (func (db database.Store , check * expects ) {
4031
4031
// TODO: we need to create a ProvisionerJob resource
4032
4032
j := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
4033
4033
check .Args (database.UpdateProvisionerJobWithCompleteByIDParams {
4034
4034
ID : j .ID ,
4035
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4035
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4036
4036
}))
4037
4037
s .Run ("UpdateProvisionerJobByID" , 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.UpdateProvisionerJobByIDParams {
4041
4041
ID : j .ID ,
4042
4042
UpdatedAt : time .Now (),
4043
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4043
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4044
4044
}))
4045
4045
s .Run ("InsertProvisionerJob" , s .Subtest (func (db database.Store , check * expects ) {
4046
4046
dbtestutil .DisableForeignKeysAndTriggers (s .T (), db )
@@ -4051,21 +4051,21 @@ func (s *MethodTestSuite) TestSystemFunctions() {
4051
4051
StorageMethod : database .ProvisionerStorageMethodFile ,
4052
4052
Type : database .ProvisionerJobTypeWorkspaceBuild ,
4053
4053
Input : json .RawMessage ("{}" ),
4054
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4054
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4055
4055
}))
4056
4056
s .Run ("InsertProvisionerJobLogs" , s .Subtest (func (db database.Store , check * expects ) {
4057
4057
// TODO: we need to create a ProvisionerJob resource
4058
4058
j := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
4059
4059
check .Args (database.InsertProvisionerJobLogsParams {
4060
4060
JobID : j .ID ,
4061
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4061
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4062
4062
}))
4063
4063
s .Run ("InsertProvisionerJobTimings" , 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.InsertProvisionerJobTimingsParams {
4067
4067
JobID : j .ID ,
4068
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4068
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4069
4069
}))
4070
4070
s .Run ("UpsertProvisionerDaemon" , s .Subtest (func (db database.Store , check * expects ) {
4071
4071
dbtestutil .DisableForeignKeysAndTriggers (s .T (), db )
0 commit comments