MCPcopy Index your code
hub / github.com/docker/cli / checkDirNoNewPluginServer

Function checkDirNoNewPluginServer

cli-plugins/socket/socket_test.go:134–148  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

132}
133
134func checkDirNoNewPluginServer(t *testing.T) {
135 t.Helper()
136
137 files, err := os.ReadDir(".")
138 assert.NilError(t, err, "failed to list files in dir to check for leaked sockets")
139
140 for _, f := range files {
141 info, err := f.Info()
142 assert.NilError(t, err, "failed to check file info")
143 // check for a socket with `docker_cli_` in the name (from `SetupConn()`)
144 if strings.Contains(f.Name(), "docker_cli_") && info.Mode().Type() == fs.ModeSocket {
145 t.Fatal("found socket in a local directory")
146 }
147 }
148}
149
150func TestConnectAndWait(t *testing.T) {
151 t.Run("calls cancel func on EOF", func(t *testing.T) {

Callers 1

TestPluginServerFunction · 0.85

Calls 5

ContainsMethod · 0.80
ModeMethod · 0.80
InfoMethod · 0.45
NameMethod · 0.45
TypeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…