From: Ian Jackson Date: Sun, 20 Oct 2019 13:01:15 +0000 (+0100) Subject: mtest/t-basic: New test, with expected output X-Git-Tag: v0.5.0~25 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=9b5dbbb61cf9acc53d11411f99992d3df087d666;p=secnet.git mtest/t-basic: New test, with expected output Signed-off-by: Ian Jackson --- diff --git a/mtest/e-basic.conf b/mtest/e-basic.conf new file mode 100644 index 0000000..51266f0 --- /dev/null +++ b/mtest/e-basic.conf @@ -0,0 +1,48 @@ +# secnet sites file autogenerated by make-secnet-sites version 0.1.18 +# Sun Oct 20 13:55:05 2019 +# Command line: ./make-secnet-sites test-example/sites ./mtest/d-basic/out.conf + +vpn-data { + test-example { + # restrict-nets "172.18.232.0/28" + hash sha1; + dh diffie-hellman("8db5f2c15ac96d9f3382d1ef4688fba14dc7908ae7dfd71a9cfe7f479a75d506dc53f159aeaf488bde073fe544bc91c099f101fcf60074f30c06e36263c03ca9e07931ce3fc235fe1171dc6d9316fb097bd4362891e2c36e234e7c16b038fd97b1f165c710e90537de66ee4f54001f5712b050d4e07de3fba07607b19b64f6c3","2"); + setup-timeout 2000; + setup-retries 5; + # Contact email address: + key-lifetime 72000000; + + inside { + inside { + name "test-example/inside/inside"; + key rsa-public("65537","130064631890186713927887504218626486455931306300999583387009075747001546036643522074275473238061323169592347601185592753550279410171535737146240085267000508853176463710554801101055212967131924064664249613912656320653505750073021702169423354903540699008756137338575553686987244488914481168225136440872431691669"); + mobile True; + address "[127.0.0.1]"; port 16910; + link netlink { + routes "172.18.232.8/29"; + ptp-address "172.18.232.9"; + }; + }; + }; + outside { + outside { + name "test-example/outside/outside"; + key rsa-public("65537","129251483458784900555621175262818292872587807329014927540074484804119474262261383244074013537736576331652560727149001626325243856012659665194546933097292703586821422085819615124517093786704646988649444946154384037948502112302285511195679291084694375811092516151263088200304199780052361048758446082354317801941"); + address "[::1]"; port 16900; + link netlink { + routes "172.18.232.0/29"; + ptp-address "172.18.232.1"; + }; + }; + }; + }; +}; +vpn { + test-example { + inside vpn-data/test-example/inside/inside; + outside vpn-data/test-example/outside/outside; + + all-sites inside,outside; + }; +}; +all-sites vpn/test-example/all-sites; diff --git a/mtest/t-basic b/mtest/t-basic new file mode 100755 index 0000000..be70503 --- /dev/null +++ b/mtest/t-basic @@ -0,0 +1,11 @@ +#! /usr/bin/tclsh + +source mtest/common.tcl + +run-mss test-example/sites $tmp/out.conf + +set seddery { sed -n 's/^[ \t]*//; /^[^#]/p' } +exec bash -c " + diff -u <($seddery mtest/e-basic.conf) \\ + <($seddery $tmp/out.conf ) +"