@@ -45,26 +45,6 @@ func TestResolve(t *testing.T) {
4545assert .Equal (t , "127.0.0.1:53" , address )
4646}
4747
48- // TestIsPostgresSSLRequest tests the IsPostgresSSLRequest function.
49- // It checks the entire SSL request including the length.
50- func TestIsPostgresSSLRequest (t * testing.T ) {
51- // Test a valid SSL request.
52- sslRequest := []byte {0x00 , 0x00 , 0x00 , 0x8 , 0x04 , 0xd2 , 0x16 , 0x2f }
53- assert .True (t , IsPostgresSSLRequest (sslRequest ))
54-
55- // Test an invalid SSL request.
56- invalidSSLRequest := []byte {0x00 , 0x00 , 0x00 , 0x9 , 0x04 , 0xd2 , 0x16 , 0x2e }
57- assert .False (t , IsPostgresSSLRequest (invalidSSLRequest ))
58-
59- // Test an invalid SSL request.
60- invalidSSLRequest = []byte {0x04 , 0xd2 , 0x16 }
61- assert .False (t , IsPostgresSSLRequest (invalidSSLRequest ))
62-
63- // Test an invalid SSL request.
64- invalidSSLRequest = []byte {0x00 , 0x00 , 0x00 , 0x00 , 0x04 , 0xd2 , 0x16 , 0x2f , 0x00 }
65- assert .False (t , IsPostgresSSLRequest (invalidSSLRequest ))
66- }
67-
6848var seedValues = []int {1000 , 10000 , 100000 , 1000000 , 10000000 }
6949
7050func BenchmarkGetID (b * testing.B ) {
@@ -192,9 +172,3 @@ func BenchmarkExtractFieldValue(b *testing.B) {
192172)
193173}
194174}
195-
196- func BenchmarkIsPostgresSSLRequest (b * testing.B ) {
197- for i := 0 ; i < b .N ; i ++ {
198- IsPostgresSSLRequest ([]byte {0x00 , 0x00 , 0x00 , 0x8 , 0x04 , 0xd2 , 0x16 , 0x2f })
199- }
200- }
0 commit comments