Преглед изворни кода

Updated TLS and QUIC expected tunnel fields test

Amir Khan пре 1 година
родитељ
комит
f1beca35b8
1 измењених фајлова са 18 додато и 0 уклоњено
  1. 18 0
      psiphon/server/server_test.go

+ 18 - 0
psiphon/server/server_test.go

@@ -2310,11 +2310,29 @@ func checkExpectedServerTunnelLogFields(
 		}
 		}
 	}
 	}
 
 
+	if protocol.TunnelProtocolUsesMeekHTTPS(runConfig.tunnelProtocol) ||
+		protocol.TunnelProtocolUsesTLSOSSH(runConfig.tunnelProtocol) {
+
+		for _, name := range []string{
+			"tls_sent_ticket",
+			"tls_did_resume",
+		} {
+			if fields[name] == nil || fmt.Sprintf("%s", fields[name]) == "" {
+				return fmt.Errorf("missing expected field '%s'", name)
+			}
+		}
+
+	}
+
 	if protocol.TunnelProtocolUsesQUIC(runConfig.tunnelProtocol) {
 	if protocol.TunnelProtocolUsesQUIC(runConfig.tunnelProtocol) {
 
 
 		for _, name := range []string{
 		for _, name := range []string{
 			"quic_version",
 			"quic_version",
 			"quic_dial_sni_address",
 			"quic_dial_sni_address",
+			"quic_dial_early",
+			"quic_sent_ticket",
+			"quic_did_resume",
+			"quic_obfuscated_psk",
 		} {
 		} {
 			if fields[name] == nil || fmt.Sprintf("%s", fields[name]) == "" {
 			if fields[name] == nil || fmt.Sprintf("%s", fields[name]) == "" {
 				return fmt.Errorf("missing expected field '%s'", name)
 				return fmt.Errorf("missing expected field '%s'", name)