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

Function TestIsAlreadyExists

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

Source from the content-addressed store, hash-verified

32}
33
34func TestIsAlreadyExists(t *testing.T) {
35 err := fmt.Errorf(`object "name": %w`, ErrAlreadyExists)
36 assert.Assert(t, IsAlreadyExistsError(err))
37
38 assert.Assert(t, !IsAlreadyExistsError(errors.New("another error")))
39}
40
41func TestIsForbidden(t *testing.T) {
42 err := fmt.Errorf(`object "name": %w`, ErrForbidden)

Callers

nothing calls this directly

Calls 1

IsAlreadyExistsErrorFunction · 0.85

Tested by

no test coverage detected