MCPcopy Create free account
hub / github.com/PostHog/duckgres / passwordMessage

Function passwordMessage

server/worker_auth_test.go:12–19  ·  view source on GitHub ↗

passwordMessage builds a client PasswordMessage ('p') for the given password.

(t *testing.T, password string)

Source from the content-addressed store, hash-verified

10
11// passwordMessage builds a client PasswordMessage ('p') for the given password.
12func passwordMessage(t *testing.T, password string) []byte {
13 t.Helper()
14 var buf bytes.Buffer
15 if err := wire.WriteMessage(&buf, wire.MsgPassword, append([]byte(password), 0)); err != nil {
16 t.Fatalf("failed to build password message: %v", err)
17 }
18 return buf.Bytes()
19}
20
21// runChildAuth feeds clientBytes to authenticateChildClient and returns the
22// exit code plus everything the server wrote to the client.

Calls 1

WriteMessageFunction · 0.92

Tested by

no test coverage detected