MCPcopy Create free account
hub / github.com/dan-v/lambda-nat-proxy / TestUnknownOpcode

Function TestUnknownOpcode

pkg/shared/control_test.go:84–95  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

82}
83
84func TestUnknownOpcode(t *testing.T) {
85 var buf bytes.Buffer
86
87 // Write invalid opcode
88 buf.WriteByte(0xFF)
89
90 // Should fail to read
91 _, _, err := ReadControlMessage(&buf)
92 if err == nil {
93 t.Error("Expected error for unknown opcode, got nil")
94 }
95}

Callers

nothing calls this directly

Calls 2

ReadControlMessageFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected