@@ -1748,7 +1748,7 @@ func (s *MethodTestSuite) TestUser() {
1748
1748
check .Args (database.DeleteCustomRoleParams {
1749
1749
Name : customRole .Name ,
1750
1750
}).Asserts (
1751
- // fails immediately, missing organization id
1751
+ // fails immediately, missing organization id
1752
1752
).Errors (dbauthz.NotAuthorizedError {Err : xerrors .New ("custom roles must belong to an organization" )})
1753
1753
}))
1754
1754
s .Run ("Blank/UpdateCustomRole" , s .Subtest (func (db database.Store , check * expects ) {
@@ -1779,7 +1779,7 @@ func (s *MethodTestSuite) TestUser() {
1779
1779
codersdk .ResourceWorkspace : {codersdk .ActionRead },
1780
1780
}), convertSDKPerm ),
1781
1781
}).Asserts (
1782
- // fails immediately, missing organization id
1782
+ // fails immediately, missing organization id
1783
1783
).Errors (dbauthz.NotAuthorizedError {Err : xerrors .New ("custom roles must belong to an organization" )})
1784
1784
}))
1785
1785
s .Run ("OrgPermissions/UpdateCustomRole" , s .Subtest (func (db database.Store , check * expects ) {
@@ -1832,7 +1832,7 @@ func (s *MethodTestSuite) TestUser() {
1832
1832
codersdk .ResourceWorkspace : {codersdk .ActionRead },
1833
1833
}), convertSDKPerm ),
1834
1834
}).Asserts (
1835
- // fails immediately, missing organization id
1835
+ // fails immediately, missing organization id
1836
1836
).Errors (dbauthz.NotAuthorizedError {Err : xerrors .New ("custom roles must belong to an organization" )})
1837
1837
}))
1838
1838
s .Run ("OrgPermissions/InsertCustomRole" , s .Subtest (func (db database.Store , check * expects ) {
@@ -3843,7 +3843,7 @@ func (s *MethodTestSuite) TestSystemFunctions() {
3843
3843
s .Run ("GetProvisionerJobsCreatedAfter" , s .Subtest (func (db database.Store , check * expects ) {
3844
3844
// TODO: add provisioner job resource type
3845
3845
_ = dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {CreatedAt : time .Now ().Add (- time .Hour )})
3846
- check .Args (time .Now ()).Asserts
6D4E
( /*rbac.ResourceSystem, policy.ActionRead*/ )
3846
+ check .Args (time .Now ()).Asserts ( /*rbac.ResourceSystem, policy.ActionRead*/ )
3847
3847
}))
3848
3848
s .Run ("GetTemplateVersionsByIDs" , s .Subtest (func (db database.Store , check * expects ) {
3849
3849
dbtestutil .DisableForeignKeysAndTriggers (s .T (), db )
@@ -4020,7 +4020,7 @@ func (s *MethodTestSuite) TestSystemFunctions() {
4020
4020
a := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
4021
4021
b := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
4022
4022
check .Args ([]uuid.UUID {a .ID , b .ID }).
4023
- Asserts ( /*rbac.ResourceSystem, policy.ActionRead*/ ).
4023
+ Asserts ( /*rbac.ResourceSystem, policy.ActionRead*/ ).
4024
4024
Returns (slice .New (a , b ))
4025
4025
}))
4026
4026
s .Run ("InsertWorkspaceAgent" , s .Subtest (func (db database.Store , check * expects ) {
@@ -4065,22 +4065,22 @@ func (s *MethodTestSuite) TestSystemFunctions() {
4065
4065
OrganizationID : j .OrganizationID ,
4066
4066
Types : []database.ProvisionerType {j .Provisioner },
4067
4067
ProvisionerTags : must (json .Marshal (j .Tags )),
4068
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4068
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4069
4069
}))
4070
4070
s .Run ("UpdateProvisionerJobWithCompleteByID" , 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.UpdateProvisionerJobWithCompleteByIDParams {
4074
4074
ID : j .ID ,
4075
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4075
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4076
4076
}))
4077
4077
s .Run ("UpdateProvisionerJobByID" , s .Subtest (func (db database.Store , check * expects ) {
4078
4078
// TODO: we need to create a ProvisionerJob resource
4079
4079
j := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
4080
4080
check .Args (database.UpdateProvisionerJobByIDParams {
4081
4081
ID : j .ID ,
4082
4082
UpdatedAt : time .Now (),
4083
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4083
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4084
4084
}))
4085
4085
s .Run ("InsertProvisionerJob" , s .Subtest (func (db database.Store , check * expects ) {
4086
4086
dbtestutil .DisableForeignKeysAndTriggers (s .T (), db )
@@ -4091,21 +4091,21 @@ func (s *MethodTestSuite) TestSystemFunctions() {
4091
4091
StorageMethod : database .ProvisionerStorageMethodFile ,
4092
4092
Type : database .ProvisionerJobTypeWorkspaceBuild ,
4093
4093
Input : json .RawMessage ("{}" ),
4094
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4094
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4095
4095
}))
4096
4096
s .Run ("InsertProvisionerJobLogs" , s .Subtest (func (db database.Store , check * expects ) {
4097
4097
// TODO: we need to create a ProvisionerJob resource
4098
4098
j := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
4099
4099
check .Args (database.InsertProvisionerJobLogsParams {
4100
4100
JobID : j .ID ,
4101
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4101
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4102
4102
}))
4103
4103
s .Run ("InsertProvisionerJobTimings" , s .Subtest (func (db database.Store , check * expects ) {
4104
4104
// TODO: we need to create a ProvisionerJob resource
4105
4105
j := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
4106
4106
check .Args (database.InsertProvisionerJobTimingsParams {
4107
4107
JobID : j .ID ,
4108
- }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4108
+ }).Asserts ( /*rbac.ResourceSystem, policy.ActionCreate*/ )
4109
4109
}))
4110
4110
s .Run ("UpsertProvisionerDaemon" , s .Subtest (func (db database.Store , check * expects ) {
4111
4111
dbtestutil .DisableForeignKeysAndTriggers (s .T (), db )
@@ -4762,7 +4762,7 @@ func (s *MethodTestSuite) TestPrebuilds() {
4762
4762
Asserts (rbac .ResourceTemplate , policy .ActionRead ).
4763
4763
ErrorsWithInMemDB (dbmem .ErrUnimplemented )
4764
4764
}))
4765
- s .Run ("GetPrebuildsInProgress " , s .Subtest (func (_ database.Store , check * expects ) {
4765
+ s .Run ("CountInProgressPrebuilds " , s .Subtest (func (_ database.Store , check * expects ) {
4766
4766
check .Args ().
4767
4767
Asserts (rbac .ResourceTemplate , policy .ActionRead ).
4768
4768
ErrorsWithInMemDB (dbmem .ErrUnimplemented )
0 commit comments