Skip to content

Commit 8f92a77

Browse files
committed
Fix job, license, and org
1 parent 712c0f4 commit 8f92a77

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

coderd/authzquery/job_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ func (suite *MethodTestSuite) TestProvsionerJob() {
9595
suite.RunMethodTest(func(t *testing.T, db database.Store) MethodCase {
9696
a := dbgen.ProvisionerJob(t, db, database.ProvisionerJob{})
9797
b := dbgen.ProvisionerJob(t, db, database.ProvisionerJob{})
98-
return methodCase(values([]uuid.UUID{a.ID, b.ID}), asserts(), values(a, b))
98+
return methodCase(values([]uuid.UUID{a.ID, b.ID}), asserts(),
99+
values([]database.ProvisionerJob{a, b}))
99100
})
100101
})
101102
suite.Run("GetProvisionerLogsByIDBetween", func() {

coderd/authzquery/license_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ func (suite *MethodTestSuite) TestLicense() {
1818
Uuid: uuid.NullUUID{UUID: uuid.New(), Valid: true},
1919
})
2020
require.NoError(t, err)
21-
return methodCase(values(), asserts(l, rbac.ActionRead), values(l))
21+
return methodCase(values(), asserts(l, rbac.ActionRead),
22+
values([]database.License{l}))
2223
})
2324
})
2425
suite.Run("InsertLicense", func() {
2526
suite.RunMethodTest(func(t *testing.T, db database.Store) MethodCase {
26-
return methodCase(values(database.InsertLicenseParams{}), asserts(rbac.ResourceLicense, rbac.ActionCreate), values(database.License{}))
27+
return methodCase(values(database.InsertLicenseParams{}),
28+
asserts(rbac.ResourceLicense, rbac.ActionCreate), nil)
2729
})
2830
})
2931
suite.Run("InsertOrUpdateLogoURL", func() {

coderd/authzquery/organization_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func (suite *MethodTestSuite) TestOrganization() {
4040
mb := dbgen.OrganizationMember(t, db, database.OrganizationMember{OrganizationID: ob.ID})
4141
return methodCase(values([]uuid.UUID{ma.UserID, mb.UserID}),
4242
asserts(rbac.ResourceUser.WithID(ma.UserID), rbac.ActionRead, rbac.ResourceUser.WithID(mb.UserID), rbac.ActionRead),
43-
values([]database.Organization{oa, ob}))
43+
nil)
4444
})
4545
})
4646
suite.Run("GetOrganizationMemberByUserID", func() {

0 commit comments

Comments
 (0)