aboutsummaryrefslogtreecommitdiff
path: root/tests/test03.vtc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test03.vtc')
-rw-r--r--tests/test03.vtc23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/test03.vtc b/tests/test03.vtc
new file mode 100644
index 0000000..052b4ed
--- /dev/null
+++ b/tests/test03.vtc
@@ -0,0 +1,23 @@
1varnishtest "Test basic HTTP authentication: SHA1"
2
3server s1 {
4 rxreq
5 txresp
6} -start
7
8varnish v1 -vcl+backend {
9 import basicauth from "${vmod_topbuild}/src/.libs/libvmod_basicauth.so";
10 sub vcl_deliver {
11 set resp.http.result = basicauth.match("${vmod_topsrc}/tests/htpasswd", "Basic bWV0aG9kLXNoYTE6Z3Vlc3NtZS1zaGEx");
12 }
13} -start
14
15client c1 {
16 txreq -url "/"
17 rxresp
18 expect resp.http.result == true
19}
20
21client c1 -run
22
23

Return to:

Send suggestions and report system problems to the System administrator.