MCPcopy Create free account
hub / github.com/docker/compose / TestIsForbidden

Function TestIsForbidden

pkg/api/errors_test.go:41–46  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

39}
40
41func TestIsForbidden(t *testing.T) {
42 err := fmt.Errorf(`object "name": %w`, ErrForbidden)
43 assert.Assert(t, IsForbiddenError(err))
44
45 assert.Assert(t, !IsForbiddenError(errors.New("another error")))
46}
47
48func TestIsUnknown(t *testing.T) {
49 err := fmt.Errorf(`object "name": %w`, ErrUnknown)

Callers

nothing calls this directly

Calls 1

IsForbiddenErrorFunction · 0.85

Tested by

no test coverage detected