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

Method AlwaysReturn

coderd/coderdtest/authorize.go:377–382  ·  view source on GitHub ↗

AlwaysReturn is the error that will be returned by Authorize.

(err error)

Source from the content-addressed store, hash-verified

375
376// AlwaysReturn is the error that will be returned by Authorize.
377func (d *FakeAuthorizer) AlwaysReturn(err error) *FakeAuthorizer {
378 d.ConditionalReturn = func(_ context.Context, _ rbac.Subject, _ policy.Action, _ rbac.Object) error {
379 return err
380 }
381 return d
382}
383
384// OverrideSQLFilter sets the SQL filter that will always be returned by CompileToSQL.
385func (d *FakeAuthorizer) OverrideSQLFilter(filter string) *FakeAuthorizer {

Callers 6

SubtestWithDBMethod · 0.95
TestWorkspaceAgentParamFunction · 0.80
TestInTXFunction · 0.80

Calls

no outgoing calls

Tested by 6

SubtestWithDBMethod · 0.76
TestWorkspaceAgentParamFunction · 0.64
TestInTXFunction · 0.64