#! /usr/bin/tclsh
+# This file is part of secnet.
+# See LICENCE and this file CREDITS for full list of copyright holders.
+# SPDX-License-Identifier: GPL-3.0-or-later
+# There is NO WARRANTY.
source mtest/common.tcl
}
}
+#----- wrong group is rejected -----
+
+set bad [lreplace $good 1 1 Gwrong]
+
+if {![catch {
+ eval run-mss-userv $bad
+} emsg]} {
+ error "should have failed"
+} else {
+ switch -glob $emsg {
+ {*caller not in group Ginside*} { }
+ * { error "huh ? $emsg" }
+ }
+}
+
+#----- resulting sites file is processable -----
+
+eval run-mss $tmp/out.sites >$tmp/out.conf
+
+diff-mss-sites-conf mtest/e-userv.conf $tmp/out.conf
+
+#----- works without group in `location' line -----
+
+set testgf $tmp/Ginside.no-group
+
+exec sed < mtest/Ginside.sites > $testgf {/^location / s/ root$//}
+
+set testargs [lreplace $good end end $testgf]
+eval run-mss-userv $testargs