summaryrefslogtreecommitdiffabout
path: root/tests/test01.vtc
blob: f419271fba8f98ba20f38125d2afab07849f1383 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
varnishtest "Test basic HTTP authentication: CRYPT"

server s1 {
       rxreq
       txresp
} -start

varnish v1 -vcl+backend {
	import basicauth from "${vmod_topbuild}/src/.libs/libvmod_basicauth.so";
	sub vcl_deliver {
		set resp.http.result = basicauth.match("${vmod_topsrc}/tests/htpasswd", "Basic bWV0aG9kLWNyeXB0Omd1ZXNzbWUtY3J5cHQ=");
	}
} -start

client c1 {
	txreq -url "/"
	rxresp
	expect resp.http.result == true
}

client c1 -run


Return to:

Send suggestions and report system problems to the System administrator.