MCPcopy
hub / github.com/moby/moby / TestFindNetworkErrorType

Function TestFindNetworkErrorType

daemon/daemon_test.go:315–323  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

313}
314
315func TestFindNetworkErrorType(t *testing.T) {
316 d := Daemon{}
317 _, err := d.FindNetwork("fakeNet")
318 var nsn libnetwork.ErrNoSuchNetwork
319 ok := errors.As(err, &nsn)
320 if !cerrdefs.IsNotFound(err) || !ok {
321 t.Error("The FindNetwork method MUST always return an error that implements the NotFound interface and is ErrNoSuchNetwork")
322 }
323}
324
325// TestDeriveULABaseNetwork checks that for a given hostID, the derived prefix is stable over time.
326func TestDeriveULABaseNetwork(t *testing.T) {

Callers

nothing calls this directly

Calls 2

FindNetworkMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…