MCPcopy
hub / github.com/basecamp/once / TestWithApplicationError

Function TestWithApplicationError

internal/command/root_test.go:42–54  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

40}
41
42func TestWithApplicationError(t *testing.T) {
43 ns, err := docker.NewNamespace("test", docker.WithApplications(
44 docker.ApplicationSettings{Name: "myapp", Host: "myapp.localhost"},
45 ))
46 require.NoError(t, err)
47
48 err = withApplication(ns, "myapp.localhost", "starting", func(app *docker.Application) error {
49 return assert.AnError
50 })
51
52 require.Error(t, err)
53 assert.Contains(t, err.Error(), "starting application")
54}

Callers

nothing calls this directly

Calls 4

NewNamespaceFunction · 0.92
WithApplicationsFunction · 0.92
withApplicationFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…