MCPcopy Index your code
hub / github.com/coder/coder / NoActorErrorTest

Method NoActorErrorTest

coderd/database/dbauthz/setup_test.go:332–338  ·  view source on GitHub ↗
(callMethod func(ctx context.Context) ([]reflect.Value, error))

Source from the content-addressed store, hash-verified

330}
331
332func (s *MethodTestSuite) NoActorErrorTest(callMethod func(ctx context.Context) ([]reflect.Value, error)) {
333 s.Run("AsRemoveActor", func() {
334 // Call without any actor
335 _, err := callMethod(context.Background())
336 s.ErrorIs(err, dbauthz.ErrNoActor, "method should return NoActorError error when no actor is provided")
337 })
338}
339
340// NotAuthorizedErrorTest runs the given method with an authorizer that will fail authz.
341// Asserts that the error returned is a NotAuthorizedError.

Callers 1

SubtestWithDBMethod · 0.95

Calls 1

RunMethod · 0.65

Tested by

no test coverage detected