MCPcopy
hub / github.com/ContainerSSH/ContainerSSH / TestUnencrypted

Function TestUnencrypted

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

Source from the content-addressed store, hash-verified

57}
58
59func TestUnencrypted(t *testing.T) {
60 clientConfig, serverConfig := createClientServerConfig(t)
61
62 message := "Hi"
63
64 response, responseStatus, err := runRequest(clientConfig, serverConfig, t, message)
65 if err != nil {
66 assert.Fail(t, "failed to run request", err)
67 return
68 }
69 assert.Equal(t, 200, responseStatus)
70 assert.Equal(t, false, response.Error)
71 assert.Equal(t, "Hello world!", response.Message)
72}
73
74func createClientServerConfig(t *testing.T) (config.HTTPClientConfiguration, config.HTTPServerConfiguration) {
75 clientConfig := config.HTTPClientConfiguration{}

Callers

nothing calls this directly

Calls 3

createClientServerConfigFunction · 0.85
runRequestFunction · 0.85
FailMethod · 0.80

Tested by

no test coverage detected