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

Function TestWriteAuthCleartextPassword

server/protocol_test.go:260–273  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

258}
259
260func TestWriteAuthCleartextPassword(t *testing.T) {
261 var buf bytes.Buffer
262
263 err := wire.WriteAuthCleartextPassword(&buf)
264 if err != nil {
265 t.Fatalf("wire.WriteAuthCleartextPassword() error = %v", err)
266 }
267
268 // Auth type should be 3 (cleartext password)
269 authType := binary.BigEndian.Uint32(buf.Bytes()[5:9])
270 if authType != 3 {
271 t.Errorf("auth type = %d, want 3", authType)
272 }
273}
274
275func TestWriteParameterStatus(t *testing.T) {
276 var buf bytes.Buffer

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected