@@ -79,6 +79,17 @@ func TestBasicMatching(t *testing.T) {
79
79
"/utp" ,
80
80
}
81
81
82
+ good_quic := []string {
83
+ "/ip4/1.2.3.4/udp/1234/quic" ,
84
+ "/ip6/::/udp/1234/quic" ,
85
+ }
86
+
87
+ bad_quic := []string {
88
+ "/ip4/0.0.0.0/tcp/12345/quic" ,
89
+ "/ip6/1.2.3.4/ip4/0.0.0.0/udp/1234/quic" ,
90
+ "/quic" ,
91
+ }
92
+
82
93
good_ipfs := []string {
83
94
"/ip4/1.2.3.4/tcp/1234/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ" ,
84
95
"/ip6/::/tcp/1234/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ" ,
@@ -102,17 +113,20 @@ func TestBasicMatching(t *testing.T) {
102
113
assertMismatches (t , TCP , bad_tcp , good_ip )
103
114
104
115
assertMatches (t , UDP , good_udp )
105
- assertMismatches (t , UDP , bad_udp , good_ip , good_tcp , good_ipfs , good_utp )
116
+ assertMismatches (t , UDP , bad_udp , good_ip , good_tcp , good_ipfs , good_utp , good_quic )
106
117
107
118
assertMatches (t , UTP , good_utp )
108
- assertMismatches (t , UTP , bad_utp , good_ip , good_tcp , good_udp )
119
+ assertMismatches (t , UTP , bad_utp , good_ip , good_tcp , good_udp , good_quic )
120
+
121
+ assertMatches (t , QUIC , good_quic )
122
+ assertMismatches (t , QUIC , bad_quic , good_ip , good_tcp , good_udp , good_utp )
109
123
110
- assertMatches (t , Reliable , good_utp , good_tcp )
124
+ assertMatches (t , Reliable , good_utp , good_tcp , good_quic )
111
125
assertMismatches (t , Reliable , good_ip , good_udp , good_ipfs )
112
126
113
127
assertMatches (t , Unreliable , good_udp )
114
- assertMismatches (t , Unreliable , good_ip , good_tcp , good_utp , good_ipfs )
128
+ assertMismatches (t , Unreliable , good_ip , good_tcp , good_utp , good_ipfs , good_quic )
115
129
116
130
assertMatches (t , IPFS , good_ipfs )
117
- assertMismatches (t , IPFS , bad_ipfs , good_ip , good_tcp , good_utp , good_udp )
131
+ assertMismatches (t , IPFS , bad_ipfs , good_ip , good_tcp , good_utp , good_udp , good_quic )
118
132
}
0 commit comments