Skip to content

Commit 3c7c323

Browse files
committed
added missing dbauthz tests
1 parent b65f620 commit 3c7c323

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

coderd/database/dbauthz/dbauthz_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4034,6 +4034,13 @@ func (s *MethodTestSuite) TestSystemFunctions() {
40344034
ID: j.ID,
40354035
}).Asserts( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
40364036
}))
4037+
s.Run("UpdateProvisionerJobWithCompleteWithStartedAtByID", s.Subtest(func(db database.Store, check *expects) {
4038+
// TODO: we need to create a ProvisionerJob resource
4039+
j := dbgen.ProvisionerJob(s.T(), db, nil, database.ProvisionerJob{})
4040+
check.Args(database.UpdateProvisionerJobWithCompleteWithStartedAtByIDParams{
4041+
ID: j.ID,
4042+
}).Asserts( /*rbac.ResourceSystem, policy.ActionUpdate*/ )
4043+
}))
40374044
s.Run("UpdateProvisionerJobByID", s.Subtest(func(db database.Store, check *expects) {
40384045
// TODO: we need to create a ProvisionerJob resource
40394046
j := dbgen.ProvisionerJob(s.T(), db, nil, database.ProvisionerJob{})
@@ -4204,6 +4211,9 @@ func (s *MethodTestSuite) TestSystemFunctions() {
42044211
s.Run("GetHungProvisionerJobs", s.Subtest(func(db database.Store, check *expects) {
42054212
check.Args(time.Time{}).Asserts()
42064213
}))
4214+
s.Run("GetNotStartedProvisionerJobs", s.Subtest(func(db database.Store, check *expects) {
4215+
check.Args(time.Time{}).Asserts()
4216+
}))
42074217
s.Run("UpsertOAuthSigningKey", s.Subtest(func(db database.Store, check *expects) {
42084218
check.Args("foo").Asserts(rbac.ResourceSystem, policy.ActionUpdate)
42094219
}))

0 commit comments

Comments
 (0)