MCPcopy
hub / github.com/ContainerSSH/ContainerSSH / TestUnencryptedFailure

Function TestUnencryptedFailure

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

Source from the content-addressed store, hash-verified

83}
84
85func TestUnencryptedFailure(t *testing.T) {
86 clientConfig, serverConfig := createClientServerConfig(t)
87
88 message := "Hm..."
89
90 response, responseStatus, err := runRequest(clientConfig, serverConfig, t, message)
91 if err != nil {
92 assert.Fail(t, "failed to run request", err)
93 return
94 }
95 assert.Equal(t, 400, responseStatus)
96 assert.Equal(t, true, response.Error)
97 assert.Equal(t, "Be nice and greet me!", response.Message)
98}
99
100func TestEncrypted(t *testing.T) {
101 caPrivKey, caCert, caCertBytes, err := createCA()

Callers

nothing calls this directly

Calls 3

createClientServerConfigFunction · 0.85
runRequestFunction · 0.85
FailMethod · 0.80

Tested by

no test coverage detected