chiark / gitweb /
mtest/t-filter: New test for --filter mode
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 4 Dec 2019 22:06:37 +0000 (22:06 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 Feb 2020 21:56:53 +0000 (21:56 +0000)
Checked the output with
  env -u LESS git-diff --color --word-diff -w :test-example/sites :mtest/e-filter.sites
and it looks right.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
mtest/e-filter.sites [new file with mode: 0644]
mtest/t-filter [new file with mode: 0755]

diff --git a/mtest/e-filter.sites b/mtest/e-filter.sites
new file mode 100644 (file)
index 0000000..8339690
--- /dev/null
@@ -0,0 +1,32 @@
+# sites file autogenerated by make-secnet-sites
+# --filter --output-version=1
+# use make-secnet-sites to turn this file into a
+# valid /etc/secnet/sites.conf file
+
+    vpn test-example
+        contact devnull@example.com
+        dh 8db5f2c15ac96d9f3382d1ef4688fba14dc7908ae7dfd71a9cfe7f479a75d506dc53f159aeaf488bde073fe544bc91c099f101fcf60074f30c06e36263c03ca9e07931ce3fc235fe1171dc6d9316fb097bd4362891e2c36e234e7c16b038fd97b1f165c710e90537de66ee4f54001f5712b050d4e07de3fba07607b19b64f6c3 2
+        hash sha1
+        key-lifetime 72000000
+        restrict-nets 172.18.232.0/28
+        setup-timeout 2000
+        setup-retries 5
+        location out root
+            site outside
+                networks 172.18.232.0/29
+                peer 172.18.232.1
+                address [::1] 16900
+                #serial 5dcfe8e9
+                #pkg 5dc36a47
+                #pub rsa1 zt1E8Wddh26=^XgSyt2x2i)G7I5=Z[*T:4(aml1Xs1U<lN$S?+<,[h.GAJ::*NLU0tB.%kkMQJ4+y6$SH)YbKm-i$JC.WCbRgw_,UoKugJ7=R[7RJ)QbKmOuh2G?bvlTF2QbWo<Gh26=%NgS37;aBk*X819=aCASSz9E;mGSrID.pNFTF)WxUo9X@J5+Z[lTY%*EmlVds1E?KChSs!J.vn~R@Jn/66$SJ){x:mmMAJX<uC%SowCFVoUu[29=C+$S@+R.AkiMgJX<EkbR6t*E:m)Gx26+xNgS#7p.Vo9X[2V*pN8R=4CFxnVdrIm/LvFT$7<,vnCS%2W<q6FTA2{x2iBjAJm/tN8Re%+xBkwoG3s@|jAS;4dECkGS81H?9NmT5t*EMmGu<1<:@YASE2gbml5XQJ,(q6FTm!Dy]h6o81D.WCmT3t`E3i$G[2.(mCBSH)mxcjSu81E.tNcR6texllddgJX<1N*TjwVEBkbdgJ=:5NcRe%(a4iuM%2E?mCFT:4>xvnCS81>:tN$Ss!9E;mSuAJq@)YAS=4CF^heMR2=:_@7RVz>x2iooQJq@^jKUB29ECk5X7ID?N[*Tu!Yb:msMQJ9=EkgS37ux;m]i<1::rvKURztEbjkMQJD?OCmTb%tE;miM;Is@KC7RJ)gbWoiM$JD?iCFTQz`E4iVB$Jq@PvlT[+gb2i0o@JG?eChSpwQbllESQJ::xN+Tb%1ElluMs16+26FT-1;aLm[zAJm/26{Q[+),;m+GR2S*&6{Q-1_,N
+                #pub unknown-algo TPwJh>A
+                #pkgf 00000000
+                pubkey 1024 65537 129251483458784900555621175262818292872587807329014927540074484804119474262261383244074013537736576331652560727149001626325243856012659665194546933097292703586821422085819615124517093786704646988649444946154384037948502112302285511195679291084694375811092516151263088200304199780052361048758446082354317801941
+                location in root
+            site inside
+                networks 172.18.232.8/29
+                peer 172.18.232.9
+                address [127.0.0.1] 16910
+                mobile True
+                pubkey 1024 65537 130064631890186713927887504218626486455931306300999583387009075747001546036643522074275473238061323169592347601185592753550279410171535737146240085267000508853176463710554801101055212967131924064664249613912656320653505750073021702169423354903540699008756137338575553686987244488914481168225136440872431691669
+# end of sites file
diff --git a/mtest/t-filter b/mtest/t-filter
new file mode 100755 (executable)
index 0000000..78d8fb1
--- /dev/null
@@ -0,0 +1,7 @@
+#! /usr/bin/tclsh
+
+source mtest/common.tcl
+
+run-mss --filter --output-version=1 test-example/sites $tmp/out.sites
+
+diff  mtest/e-filter.sites $tmp/out.sites $seddery