@@ -142,7 +142,7 @@ func TestIptabler(t *testing.T) {
142142 resName = fmt .Sprintf ("hairpin=%v,internal=%v,icc=%v,masq=%v,snat=%v,gwm=%v,bindlh=%v" ,
143143 p (hairpin ), p (internal ), p (icc ), p (masq ), p (snat ), gwmode , p (bindLocalhost ))
144144 }
145- testIptabler (t , tn , config , netConfig , p (bindLocalhost ), tn + "_ " + resName )
145+ testIptabler (t , tn , config , netConfig , p (bindLocalhost ), tn + "/ " + resName )
146146 })
147147 }
148148 }
@@ -168,7 +168,7 @@ func testIptabler(t *testing.T, tn string, config firewaller.Config, netConfig f
168168 res := icmd .RunCommand (cmd + "-save" , "-t" , table )
169169 assert .Assert (t , res .Error )
170170 if ! en {
171- name = tn + "_no "
171+ name = tn + "/no "
172172 }
173173 dump += res .Combined ()
174174 }
@@ -199,8 +199,8 @@ func testIptabler(t *testing.T, tn string, config firewaller.Config, netConfig f
199199 // end of the test (after deleting per-network and per-port rules).
200200 fw , err := NewIptabler (context .Background (), config )
201201 assert .NilError (t , err )
202- checkResults ("iptables" , rnWSL2Mirrored (fmt .Sprintf ("%s_cleaned ,hairpin=%v" , tn , config .Hairpin )), config .IPv4 )
203- checkResults ("ip6tables" , fmt .Sprintf ("%s_cleaned ,hairpin=%v" , tn , config .Hairpin ), config .IPv6 )
202+ checkResults ("iptables" , rnWSL2Mirrored (fmt .Sprintf ("%s/cleaned ,hairpin=%v" , tn , config .Hairpin )), config .IPv4 )
203+ checkResults ("ip6tables" , fmt .Sprintf ("%s/cleaned ,hairpin=%v" , tn , config .Hairpin ), config .IPv6 )
204204
205205 // Add the network.
206206 nw , err := fw .NewNetwork (context .Background (), netConfig )
@@ -235,6 +235,6 @@ func testIptabler(t *testing.T, tn string, config firewaller.Config, netConfig f
235235 assert .NilError (t , err )
236236 err = nw .DelNetworkLevelRules (context .Background ())
237237 assert .NilError (t , err )
238- checkResults ("iptables" , rnWSL2Mirrored (fmt .Sprintf ("%s_cleaned ,hairpin=%v" , tn , config .Hairpin )), config .IPv4 )
239- checkResults ("ip6tables" , fmt .Sprintf ("%s_cleaned ,hairpin=%v" , tn , config .Hairpin ), config .IPv6 )
238+ checkResults ("iptables" , rnWSL2Mirrored (fmt .Sprintf ("%s/cleaned ,hairpin=%v" , tn , config .Hairpin )), config .IPv4 )
239+ checkResults ("ip6tables" , fmt .Sprintf ("%s/cleaned ,hairpin=%v" , tn , config .Hairpin ), config .IPv6 )
240240}
0 commit comments