MCPcopy Create free account
hub / github.com/docker/secrets-engine / runUncheckedDummyAcceptor

Function runUncheckedDummyAcceptor

plugin/config_test.go:121–128  ·  view source on GitHub ↗

We on purpose never actually deal with accepted hijacked connections or server errors as in the context of where this function is used we don't care.

(logger logging.Logger, listener net.Listener)

Source from the content-addressed store, hash-verified

119// We on purpose never actually deal with accepted hijacked connections or server errors
120// as in the context of where this function is used we don't care.
121func runUncheckedDummyAcceptor(logger logging.Logger, listener net.Listener) {
122 httpMux := http.NewServeMux()
123 httpMux.Handle(ipc.NewHijackAcceptor(logger, func(context.Context, io.ReadWriteCloser) {}))
124 server := &http.Server{Handler: httpMux}
125 go func() {
126 _ = server.Serve(listener)
127 }()
128}
129
130func Test_restoreConfig(t *testing.T) {
131 tests := []struct {

Callers 1

Calls 1

HandleMethod · 0.80

Tested by

no test coverage detected