MCPcopy
hub / github.com/lxc/incus / TestEndpoints_LocalCreateUnixSocket

Function TestEndpoints_LocalCreateUnixSocket

internal/server/endpoints/local_test.go:16–28  ·  view source on GitHub ↗

If no socket-based activation is detected, a new local unix socket will be created.

(t *testing.T)

Source from the content-addressed store, hash-verified

14// If no socket-based activation is detected, a new local unix socket will be
15// created.
16func TestEndpoints_LocalCreateUnixSocket(t *testing.T) {
17 endpoints, config, cleanup := newEndpoints(t)
18 defer cleanup()
19
20 require.NoError(t, endpoints.Up(config))
21
22 path := endpoints.LocalSocketPath()
23 assert.NoError(t, httpGetOverUnixSocket(path))
24
25 // The unix socket file gets removed after shutdown.
26 cleanup()
27 assert.Equal(t, false, util.PathExists(path))
28}
29
30// If socket-based activation is detected, it will be used for binding the API
31// Endpoints' unix socket.

Callers

nothing calls this directly

Calls 5

PathExistsFunction · 0.92
newEndpointsFunction · 0.85
httpGetOverUnixSocketFunction · 0.85
UpMethod · 0.80
LocalSocketPathMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…