Skip to content
Permalink
Browse files

use backend None instead of bad_ip backend

... for those cases which can easily be changed (most of them).

This avoids issues with failing tests when bad_ip is actually reachable
via tcp on the respective port, as seen for example with b00068.vtc
  • Loading branch information...
nigoroll committed Oct 9, 2019
1 parent 1d6d960 commit a0a3dfcff4390545c02475266a7ae75d9cebc251
@@ -38,15 +38,15 @@ varnish v1 -expect s_resp_hdrbytes == 178
varnish v2 -arg "-a ${tmpdir}/v1.sock -b '${bad_backend}'" -start

varnish v2 -syntax 4.0 -errvcl {Compiled VCL version (4.0) not supported.} {
backend default { .host = "${bad_ip}"; }
backend default None;
}

varnish v2 -syntax 4.0 -errvcl \
{Unix socket backends only supported in VCL4.1 and higher.} \
{backend default { .path = "${tmpdir}/v1.sock"; }}

varnish v3 -vcl {
backend default { .host = "${bad_ip}"; }
backend default None;

sub vcl_recv {
return(synth(200));
@@ -15,7 +15,7 @@ varnish v1 -arg "-p timeout_linger=1" \
import vtc;
import blob;

backend dummy { .host = "${bad_ip}"; }
backend dummy None;

sub vcl_recv {
std.log(blob.encode(encoding=HEX,
@@ -1,7 +1,7 @@
varnishtest "Test VSM _.index rewrite when too many deletes"

varnish v1 -vcl {
backend default { .host = "${bad_ip}"; }
backend default None;
} -start

delay 1
@@ -17,10 +17,10 @@ process p1 {
#process p3 {tail -F ${tmpdir}/v1/_.vsm_mgt/_.index} -dump -start

varnish v1 -vcl {
backend b00 { .host = "${bad_ip}"; }
backend b01 { .host = "${bad_ip}"; }
backend b02 { .host = "${bad_ip}"; }
backend b03 { .host = "${bad_ip}"; }
backend b00 None;
backend b01 None;
backend b02 None;
backend b03 None;

sub vcl_recv {
set req.backend_hint = b00;
@@ -46,26 +46,26 @@ process p1 -run
# cause a _.index rewrite.
# Make it 20 to be on the safe side.
varnish v1 -vcl {
backend b00 { .host = "${bad_ip}"; }
backend b01 { .host = "${bad_ip}"; }
backend b02 { .host = "${bad_ip}"; }
backend b03 { .host = "${bad_ip}"; }
backend b04 { .host = "${bad_ip}"; }
backend b05 { .host = "${bad_ip}"; }
backend b06 { .host = "${bad_ip}"; }
backend b07 { .host = "${bad_ip}"; }
backend b08 { .host = "${bad_ip}"; }
backend b09 { .host = "${bad_ip}"; }
backend b10 { .host = "${bad_ip}"; }
backend b11 { .host = "${bad_ip}"; }
backend b12 { .host = "${bad_ip}"; }
backend b13 { .host = "${bad_ip}"; }
backend b14 { .host = "${bad_ip}"; }
backend b15 { .host = "${bad_ip}"; }
backend b16 { .host = "${bad_ip}"; }
backend b17 { .host = "${bad_ip}"; }
backend b18 { .host = "${bad_ip}"; }
backend b19 { .host = "${bad_ip}"; }
backend b00 None;
backend b01 None;
backend b02 None;
backend b03 None;
backend b04 None;
backend b05 None;
backend b06 None;
backend b07 None;
backend b08 None;
backend b09 None;
backend b10 None;
backend b11 None;
backend b12 None;
backend b13 None;
backend b14 None;
backend b15 None;
backend b16 None;
backend b17 None;
backend b18 None;
backend b19 None;

sub vcl_recv {
set req.backend_hint = b00;
@@ -60,7 +60,7 @@ shell { chmod go-rx ${tmpdir}/dir }

varnish v8 \
-jail "-junix,user=varnish,ccgroup=varnish,workuser=vcache" \
-vcl { backend b {.host="${bad_ip}";}
-vcl { backend b None;
}

varnish v8 -cliexpect "(?s)Cannot stat:.+That was just a warning" \
@@ -69,7 +69,7 @@ logexpect l1 -v v1 -d 1 -g vxid -q "VCL_acl" {
} -run

varnish v1 -vcl {
backend b { .host = "${bad_ip}"; }
backend b None;

acl acl1 {
"0.0.0.0";
@@ -97,7 +97,7 @@ client c1 -connect "${tmpdir}/v1.sock" {
} -run

varnish v1 -errvcl {.../mask is not numeric.} {
backend b { .host = "${bad_ip}"; }
backend b None;

acl acl1 {
"${tmpdir}/v1.sock";
@@ -8,7 +8,7 @@ server s1 -listen "${tmpdir}/s1.sock" {
varnish v1 -vcl {
import debug;

backend dummy { .host = "${bad_ip}"; }
backend dummy None;

sub vcl_init {
new s1 = debug.dyn_uds("${s1_sock}");
@@ -19,7 +19,7 @@ varnish v1 -vcl {
}
} -start

varnish v1 -expect MAIN.n_backend == 2
varnish v1 -expect MAIN.n_backend == 1

client c1 {
txreq
@@ -30,7 +30,7 @@ client c1 {
varnish v1 -errvcl {path must be an absolute path} {
import debug;

backend dummy { .host = "${bad_ip}"; }
backend dummy None;

sub vcl_init {
new s1 = debug.dyn_uds("");
@@ -40,7 +40,7 @@ varnish v1 -errvcl {path must be an absolute path} {
varnish v1 -errvcl {path must be an absolute path} {
import debug;

backend dummy { .host = "${bad_ip}"; }
backend dummy None;

sub vcl_init {
new s1 = debug.dyn_uds("s1.sock");
@@ -52,7 +52,7 @@ shell { rm -f ${tmpdir}/foo }
varnish v1 -errvcl {Cannot stat path} {
import debug;

backend dummy { .host = "${bad_ip}"; }
backend dummy None;

sub vcl_init {
new s1 = debug.dyn_uds("${tmpdir}/foo");
@@ -62,7 +62,7 @@ varnish v1 -errvcl {Cannot stat path} {
varnish v1 -errvcl {is not a socket} {
import debug;

backend dummy { .host = "${bad_ip}"; }
backend dummy None;

sub vcl_init {
new s1 = debug.dyn_uds("${tmpdir}");
@@ -15,7 +15,7 @@ server s2 -listen "${tmpdir}/s2.sock" {
varnish v1 -vcl {
import debug;

backend dummy { .host = "${bad_ip}"; }
backend dummy None;

sub vcl_init {
new s1 = debug.dyn_uds("${s1_sock}");
@@ -30,7 +30,7 @@ varnish v1 -vcl {
}
} -start

varnish v1 -expect MAIN.n_backend == 2
varnish v1 -expect MAIN.n_backend == 1

client c1 {
txreq -url "/foo"
@@ -21,7 +21,7 @@ server s2 -listen "${tmpdir}/s2.sock" {
varnish v1 -vcl {
import debug;

backend dummy { .host = "${bad_ip}"; }
backend dummy None;

sub vcl_init {
new s1 = debug.dyn_uds("${s1_sock}");
@@ -36,7 +36,7 @@ varnish v1 -vcl {
}
} -start

varnish v1 -expect MAIN.n_backend == 2
varnish v1 -expect MAIN.n_backend == 1

client c1 {
txreq -url "/foo"
@@ -21,7 +21,7 @@ server s2 -listen "${tmpdir}/s2.sock" {
varnish v1 -vcl {
import debug;

backend dummy { .host = "${bad_ip}"; }
backend dummy None;

sub vcl_init {
new s1 = debug.dyn_uds("${s1_sock}");
@@ -37,7 +37,7 @@ varnish v1 -vcl {
}
} -start

varnish v1 -expect MAIN.n_backend == 2
varnish v1 -expect MAIN.n_backend == 1

client c1 {
txreq -url "/foo"
@@ -15,7 +15,7 @@ varnish v1 -vcl {
import debug;
import vtc;

backend dummy { .host = "${bad_ip}"; }
backend dummy None;

sub vcl_init {
new s1 = debug.dyn_uds("${s1_sock}");
@@ -40,7 +40,7 @@ varnish v1 -vcl {
}
} -start

varnish v1 -expect MAIN.n_backend == 2
varnish v1 -expect MAIN.n_backend == 1

client c1 {
txreq
@@ -14,7 +14,7 @@ server s1 -listen "${tmpdir}/s1.sock" {
varnish v1 -arg "-p thread_pools=1" -vcl {
import debug;

backend dummy { .host = "${bad_ip}"; }
backend dummy None;

sub vcl_init {
new s1 = debug.dyn_uds("${s1_sock}");
@@ -31,7 +31,7 @@ client c1 {
expect resp.status == 200
} -start

varnish v1 -expect MAIN.n_backend == 2
varnish v1 -expect MAIN.n_backend == 1

server s2 -listen "${tmpdir}/s2.sock" {
rxreq
@@ -44,7 +44,7 @@ barrier b1 sync
varnish v1 -vcl {
import debug;

backend dummy { .host = "${bad_ip}"; }
backend dummy None;

sub vcl_init {
new s2 = debug.dyn_uds("${s2_sock}");
@@ -61,7 +61,7 @@ barrier b2 sync
client c1 -wait
delay 2

varnish v1 -expect MAIN.n_backend == 4
varnish v1 -expect MAIN.n_backend == 2

varnish v1 -expect n_vcl_avail == 1
varnish v1 -expect n_vcl_discard == 1
@@ -15,7 +15,7 @@ varnish v1 -vcl {
import debug;
import vtc;

backend dummy { .host = "${bad_ip}"; }
backend dummy None;

sub vcl_init {
new s1 = debug.dyn_uds("${s1_sock}");
@@ -37,7 +37,7 @@ varnish v1 -vcl {
}
} -start

varnish v1 -expect MAIN.n_backend == 2
varnish v1 -expect MAIN.n_backend == 1

client c1 {
txreq
@@ -2,7 +2,7 @@ varnishtest "VMOD blob IDENTITY encode and decode"

varnish v1 -vcl {
import blob;
backend b { .host = "${bad_ip}"; }
backend b None;

sub vcl_recv {
return(synth(200));
@@ -2,7 +2,7 @@ varnishtest "VMOD blob IDENTITY decode() n chars"

varnish v1 -vcl {
import blob;
backend b { .host = "${bad_ip}"; }
backend b None;

sub vcl_recv {
return(synth(200));
@@ -4,7 +4,7 @@ varnishtest "VMOD blob hex encode and decode"
varnish v1 -arg "-p workspace_client=256k" -vcl {
import blob;
import std;
backend b { .host = "${bad_ip}"; }
backend b None;

sub vcl_recv {
return(synth(200));
@@ -3,7 +3,7 @@ varnishtest "VMOD blob hex decode() n chars"
varnish v1 -vcl {
import blob;
import std;
backend b { .host = "${bad_ip}"; }
backend b None;

sub vcl_recv {
return(synth(200));
@@ -2,7 +2,7 @@ varnishtest "VMOD blob base64 encode and decode"

varnish v1 -vcl {
import blob;
backend b { .host = "${bad_ip}"; }
backend b None;

sub vcl_recv {
return(synth(200));
@@ -126,7 +126,7 @@ client c1 {

varnish v1 -vcl {
import blob;
backend b { .host = "${bad_ip}"; }
backend b None;

sub vcl_recv {
return(synth(200));
@@ -2,7 +2,7 @@ varnishtest "VMOD blob base64 decode() n chars"

varnish v1 -vcl {
import blob;
backend b { .host = "${bad_ip}"; }
backend b None;

sub vcl_recv {
return(synth(200));
@@ -3,7 +3,7 @@ varnishtest "VMOD blob url encode and decode"
varnish v1 -vcl {
import blob;
import std;
backend b { .host = "${bad_ip}"; }
backend b None;

sub vcl_recv {
return(synth(200));
@@ -143,7 +143,7 @@ client c1 {
varnish v1 -vcl {
import blob;
import std;
backend b { .host = "${bad_ip}"; }
backend b None;

sub vcl_recv {
return(synth(200));
@@ -3,7 +3,7 @@ varnishtest "VMOD blob decode() n chars with URL"
varnish v1 -vcl {
import blob;
import std;
backend b { .host = "${bad_ip}"; }
backend b None;

sub vcl_recv {
return(synth(200));

0 comments on commit a0a3dfc

Please sign in to comment.
You can’t perform that action at this time.