@@ -1845,7 +1845,7 @@ func (s *MethodTestSuite) TestUser() {
1845
1845
check .Args (database.DeleteCustomRoleParams {
1846
1846
Name : customRole .Name ,
1847
1847
}).Asserts (
1848
- // fails immediately, missing organization id
1848
+ // fails immediately, missing organization id
1849
1849
).Errors (dbauthz.NotAuthorizedError {Err : xerrors .New ("custom roles must belong to an organization" )})
1850
1850
}))
1851
1851
s .Run ("Blank/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/UpdateCustomRole" , s .Subtest (func (db database.Store , check * expects ) {
@@ -1929,7 +1929,7 @@ func (s *MethodTestSuite) TestUser() {
1929
1929
codersdk .ResourceWorkspace : {codersdk .ActionRead },
1930
1930
}), convertSDKPerm ),
1931
1931
}).Asserts (
1932
- // fails immediately, missing organization id
1932
+ // fails immediately, missing organization id
1933
1933
).Errors (dbauthz.NotAuthorizedError {Err : xerrors .New ("custom roles must belong to an organization" )})
1934
1934
}))
1935
1935
s .Run ("OrgPermissions/InsertCustomRole" , s .Subtest (func (db database.Store , check * expects ) {
@@ -4262,13 +4262,13 @@ func (s *MethodTestSuite) TestSystemFunctions() {
4262
4262
StorageMethod : database .ProvisionerStorageMethodFile ,
4263
4263
Type : database .ProvisionerJobTypeWorkspaceBuild ,
4264
4264
Input : json .RawMessage ("{}" ),
4265
- }).Asserts ( /* rbac.ResourceProvisionerJobs, policy.ActionCreate */ )
4265
+ }).Asserts ( /* rbac.ResourceProvisionerJobs, policy.ActionCreate */ )
4266
4266
}))
4267
4267
s .Run ("InsertProvisionerJobLogs" , s .Subtest (func (db database.Store , check * expects ) {
4268
4268
j := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
4269
4269
check .Args (database.InsertProvisionerJobLogsParams {
4270
4270
JobID : j .ID ,
4271
- }).Asserts ( /* rbac.ResourceProvisionerJobs, policy.ActionUpdate */ )
4271
+ }).Asserts ( /* rbac.ResourceProvisionerJobs, policy.ActionUpdate */ )
4272
4272
}))
4273
4273
s .Run ("InsertProvisionerJobTimings" , s .Subtest (func (db database.Store , check * expects ) {
4274
4274
j := dbgen .ProvisionerJob (s .T (), db , nil , database.ProvisionerJob {})
@@ -5725,6 +5725,8 @@ func (s *MethodTestSuite) TestUserSecrets() {
5725
5725
arg := database.InsertUserSecretParams {
5726
5726
UserID : user .ID ,
5727
5727
}
5728
- check .Args (arg ).Asserts (rbac .ResourceUserSecret .WithOwner (arg .UserID .String ()), policy .ActionCreate )
5728
+ check .Args (arg ).
5729
+ Asserts (rbac .ResourceUserSecret .WithOwner (arg .UserID .String ()), policy .ActionCreate ).
5730
+ ErrorsWithInMemDB (dbmem .ErrUnimplemented )
5729
5731
}))
5730
5732
}
0 commit comments