@@ -1692,7 +1692,7 @@ func (s *MethodTestSuite) TestUser() {
1692
1692
check .Args (database.DeleteCustomRoleParams {
1693
1693
Name : customRole .Name ,
1694
1694
}).Asserts (
1695
- // fails immediately, missing organization id
1695
+ // fails immediately, missing organization id
1696
1696
).Errors (dbauthz.NotAuthorizedError {Err : xerrors .New ("custom roles must belong to an organization" )})
1697
1697
}))
1698
1698
s .Run ("Blank/UpdateCustomRole" , s .Subtest (func (db database.Store , check * expects ) {
@@ -1723,7 +1723,7 @@ func (s *MethodTestSuite) TestUser() {
1723
1723
codersdk .ResourceWorkspace : {codersdk .ActionRead },
1724
1724
}), convertSDKPerm ),
1725
1725
}).Asserts (
1726
- // fails immediately, missing organization id
1726
+ // fails immediately, missing organization id
1727
1727
).Errors (dbauthz.NotAuthorizedError {Err : xerrors .New ("custom roles must belong to an organization" )})
1728
1728
}))
1729
1729
s .Run ("OrgPermissions/UpdateCustomRole" , s .Subtest (func (db database.Store , check * expects ) {
@@ -1776,7 +1776,7 @@ func (s *MethodTestSuite) TestUser() {
1776
1776
codersdk .ResourceWorkspace : {codersdk .ActionRead },
1777
1777
}), convertSDKPerm ),
1778
1778
}).Asserts (
1779
- // fails immediately, missing organization id
1779
+ // fails immediately, missing organization id
1780
1780
).Errors (dbauthz.NotAuthorizedError {Err : xerrors .New ("custom roles must belong to an organization" )})
1781
1781
}))
1782
1782
s .Run ("OrgPermissions/InsertCustomRole" , s .Subtest (func (db database.Store , check * expects ) {
@@ -3757,7 +3757,7 @@ func (s *MethodTestSuite) TestSystemFunctions() {
3757
3757
s .Run ("GetProvisionerJobsCreatedAfter" , s .Subtest (func (db database.Store , check * expects ) {
3758
3758
// TODO: add provisioner job resource type
3759
3759
_ = dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {CreatedAt : time .Now ().Add (- time .Hour )})
3760
- check .Args (time .Now ()).Asserts ( /*rbac.ResourceSystem, policy.ActionRead*/ )
3760
+ check .Args (time .Now ()).Asserts ( /*rbac.ResourceSystem, policy.ActionRead*/ )
3761
3761
}))
3762
3762
s .Run ("GetTemplateVersionsByIDs" , s .Subtest (func (db database.Store , check * expects ) {
3763
3763
dbtestutil .DisableForeignKeysAndTriggers (s .T (), db )
@@ -3934,7 +3934,7 @@ func (s *MethodTestSuite) TestSystemFunctions() {
3934
3934
a := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
3935
3935
b := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
3936
3936
check .Args ([]uuid.UUID {a .ID , b .ID }).
3937
- Asserts ( /*rbac.ResourceSystem, policy.ActionRead*/ ).
3937
+ Asserts ( /*rbac.ResourceSystem, policy.ActionRead*/ ).
3938
3938
Returns (slice .New (a , b ))
3939
3939
}))
3940
3940
s .Run ("InsertWorkspaceAgent" , s .Subtest (func (db database.Store , check * expects ) {
@@ -3979,22 +3979,22 @@ func (s *MethodTestSuite) TestSystemFunctions() {
3979
3979
OrganizationID : j .OrganizationID ,
3980
3980
Types : []database.ProvisionerType {j .Provisioner },
3981
3981
ProvisionerTags : must (json .Marshal (j .Tags )),
3982
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
3982
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
3983
3983
}))
3984
3984
s .Run ("UpdateProvisionerJobWithCompleteByID" , s .Subtest (func (db database.Store , check * expects ) {
3985
3985
// TODO: we need to create a ProvisionerJob resource
3986
3986
j := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
3987
3987
check .Args (database.UpdateProvisionerJobWithCompleteByIDParams {
3988
3988
ID : j .ID ,
3989
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
3989
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
3990
3990
}))
3991
3991
s .Run ("UpdateProvisionerJobByID" , s .Subtest (func (db database.Store , check * expects ) {
3992
3992
// TODO: we need to create a ProvisionerJob resource
3993
3993
j := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
3994
3994
check .Args (database.UpdateProvisionerJobByIDParams {
3995
3995
ID : j .ID ,
3996
3996
UpdatedAt : time .Now (),
3997
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
3997
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
3998
3998
}))
3999
3999
s .Run ("InsertProvisionerJob" , s .Subtest (func (db database.Store , check * expects ) {
4000
4000
dbtestutil .DisableForeignKeysAndTriggers (s .T (), db )
@@ -4005,21 +4005,21 @@ func (s *MethodTestSuite) TestSystemFunctions() {
4005
4005
StorageMethod : database .ProvisionerStorageMethodFile ,
4006
4006
Type : database .ProvisionerJobTypeWorkspaceBuild ,
4007
4007
Input : json .RawMessage ("{}" ),
4008
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4008
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4009
4009
}))
4010
4010
s .Run ("InsertProvisionerJobLogs" , s .Subtest (func (db database.Store , check * expects ) {
4011
4011
// TODO: we need to create a ProvisionerJob resource
4012
4012
j := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
4013
4013
check .Args (database.InsertProvisionerJobLogsParams {
4014
4014
JobID : j .ID ,
4015
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4015
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4016
4016
}))
4017
4017
s .Run ("InsertProvisionerJobTimings" , s .Subtest (func (db database.Store , check * expects ) {
4018
4018
// TODO: we need to create a ProvisionerJob resource
4019
4019
j := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
4020
4020
check .Args (database.InsertProvisionerJobTimingsParams {
4021
4021
JobID : j .ID ,
4022
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4022
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4023
4023
}))
4024
4024
s .Run ("UpsertProvisionerDaemon" , s .Subtest (func (db database.Store , check * expects ) {
4025
4025
dbtestutil .DisableForeignKeysAndTriggers (s .T (), db )
0 commit comments