Skip to content

Commit c412918

Browse files
committed
improve testing
1 parent daa3c26 commit c412918

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

coderd/database/dbauthz/dbauthz_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4583,7 +4583,7 @@ func (s *MethodTestSuite) TestResourcesMonitor() {
45834583
monitor, err := db.FetchMemoryResourceMonitorsByAgentID(context.Background(), agt.ID)
45844584
require.NoError(s.T(), err)
45854585

4586-
check.Args(agt.ID).Asserts(rbac.ResourceSystem, policy.ActionRead).Returns(monitor)
4586+
check.Args(agt.ID).Asserts(rbac.ResourceWorkspaceAgentMemoryResourceMonitor, policy.ActionRead).Returns(monitor)
45874587
}))
45884588

45894589
s.Run("FetchVolumesResourceMonitorsByAgentID", s.Subtest(func(db database.Store, check *expects) {
@@ -4624,6 +4624,6 @@ func (s *MethodTestSuite) TestResourcesMonitor() {
46244624
monitors, err := db.FetchVolumesResourceMonitorsByAgentID(context.Background(), agt.ID)
46254625
require.NoError(s.T(), err)
46264626

4627-
check.Args(agt.ID).Asserts(rbac.ResourceSystem, policy.ActionRead).Returns(monitors)
4627+
check.Args(agt.ID).Asserts(rbac.ResourceWorkspaceAgentVolumeResourceMonitor, policy.ActionRead).Returns(monitors)
46284628
}))
46294629
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy