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

Function TestWithApplicationNotFound

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

Source from the content-addressed store, hash-verified

27}
28
29func TestWithApplicationNotFound(t *testing.T) {
30 ns, err := docker.NewNamespace("test")
31 require.NoError(t, err)
32
33 err = withApplication(ns, "missing.localhost", "testing", func(app *docker.Application) error {
34 t.Fatal("should not be called")
35 return nil
36 })
37
38 require.Error(t, err)
39 assert.Contains(t, err.Error(), `no application found at host "missing.localhost"`)
40}
41
42func TestWithApplicationError(t *testing.T) {
43 ns, err := docker.NewNamespace("test", docker.WithApplications(

Callers

nothing calls this directly

Calls 3

NewNamespaceFunction · 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…