MCPcopy
hub / github.com/ContainerSSH/ContainerSSH / createClientServerConfig

Function createClientServerConfig

http/integration_test.go:74–83  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

72}
73
74func createClientServerConfig(t *testing.T) (config.HTTPClientConfiguration, config.HTTPServerConfiguration) {
75 clientConfig := config.HTTPClientConfiguration{}
76 serverConfig := config.HTTPServerConfiguration{}
77 structutils.Defaults(&clientConfig)
78 structutils.Defaults(&serverConfig)
79 port := test.GetNextPort(t, "config server")
80 clientConfig.URL = fmt.Sprintf("http://127.0.0.1:%d/", port)
81 serverConfig.Listen = fmt.Sprintf("127.0.0.1:%d", port)
82 return clientConfig, serverConfig
83}
84
85func TestUnencryptedFailure(t *testing.T) {
86 clientConfig, serverConfig := createClientServerConfig(t)

Callers 5

TestUnencryptedFunction · 0.85
TestUnencryptedFailureFunction · 0.85
TestEncryptedFunction · 0.85

Calls 2

DefaultsFunction · 0.92
GetNextPortFunction · 0.92

Tested by

no test coverage detected