Commit f15246fc authored by Geoff Simmons's avatar Geoff Simmons

vtc tests mostly without .compile().

parent 50c4a935
...@@ -230,7 +230,6 @@ varnish v1 -vcl { ...@@ -230,7 +230,6 @@ varnish v1 -vcl {
s.add("Alcindor"); s.add("Alcindor");
s.add("Alkaid"); s.add("Alkaid");
s.add("Alice"); s.add("Alice");
s.compile();
} }
sub vcl_recv { sub vcl_recv {
......
...@@ -19,7 +19,6 @@ varnish v1 -vcl { ...@@ -19,7 +19,6 @@ varnish v1 -vcl {
s.add("baz", backend=b3); s.add("baz", backend=b3);
s.add("quux", backend=b4); s.add("quux", backend=b4);
s.add("foobar", backend=b5); s.add("foobar", backend=b5);
s.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -180,7 +179,6 @@ varnish v1 -vcl { ...@@ -180,7 +179,6 @@ varnish v1 -vcl {
s.add("foobarbaz", backend=b2); s.add("foobarbaz", backend=b2);
s.add("foobar", backend=b3); s.add("foobar", backend=b3);
s.add("foo", backend=b4); s.add("foo", backend=b4);
s.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -350,7 +348,6 @@ varnish v1 -vcl { ...@@ -350,7 +348,6 @@ varnish v1 -vcl {
s.add("foo", backend=b); s.add("foo", backend=b);
s.add("bar"); s.add("bar");
s.add("bazz", backend=b0); s.add("bazz", backend=b0);
s.compile();
} }
sub vcl_recv { sub vcl_recv {
......
...@@ -13,7 +13,6 @@ varnish v1 -vcl { ...@@ -13,7 +13,6 @@ varnish v1 -vcl {
t.add("baz"); t.add("baz");
t.add("quux"); t.add("quux");
t.add("foobar"); t.add("foobar");
t.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -158,7 +157,6 @@ varnish v1 -vcl { ...@@ -158,7 +157,6 @@ varnish v1 -vcl {
s.add("Millie"); s.add("Millie");
s.add("mil's"); s.add("mil's");
s.add("dethrones"); s.add("dethrones");
s.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -791,7 +789,6 @@ varnish v1 -vcl { ...@@ -791,7 +789,6 @@ varnish v1 -vcl {
s.add("FOOBARBAZ"); s.add("FOOBARBAZ");
s.add("FOOBAR"); s.add("FOOBAR");
s.add("FOO"); s.add("FOO");
s.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -975,7 +972,6 @@ varnish v1 -vcl { ...@@ -975,7 +972,6 @@ varnish v1 -vcl {
s.add("leTTeR"); # 5 s.add("leTTeR"); # 5
s.add("LETtEreD"); # 6 s.add("LETtEreD"); # 6
s.add("letTERING"); # 7 s.add("letTERING"); # 7
s.compile();
} }
sub vcl_recv { sub vcl_recv {
......
...@@ -14,7 +14,6 @@ varnish v1 -vcl { ...@@ -14,7 +14,6 @@ varnish v1 -vcl {
s.add("baz"); s.add("baz");
s.add("quux"); s.add("quux");
s.add("foobar"); s.add("foobar");
s.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -155,7 +154,6 @@ varnish v1 -vcl { ...@@ -155,7 +154,6 @@ varnish v1 -vcl {
s.add("foobarbaz"); s.add("foobarbaz");
s.add("foobar"); s.add("foobar");
s.add("foo"); s.add("foo");
s.compile();
} }
sub vcl_recv { sub vcl_recv {
......
...@@ -13,7 +13,6 @@ varnish v1 -vcl { ...@@ -13,7 +13,6 @@ varnish v1 -vcl {
s.add("baz", integer=2); s.add("baz", integer=2);
s.add("quux", integer=-1); s.add("quux", integer=-1);
s.add("foobar", integer=-2); s.add("foobar", integer=-2);
s.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -156,7 +155,6 @@ varnish v1 -vcl { ...@@ -156,7 +155,6 @@ varnish v1 -vcl {
s.add("baz", integer=2); s.add("baz", integer=2);
s.add("quux", integer=-1); s.add("quux", integer=-1);
s.add("foobar", integer=-2); s.add("foobar", integer=-2);
s.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -221,7 +219,6 @@ varnish v1 -vcl { ...@@ -221,7 +219,6 @@ varnish v1 -vcl {
s.add("foobarbaz", integer=2); s.add("foobarbaz", integer=2);
s.add("foobar", integer=3); s.add("foobar", integer=3);
s.add("foo", integer=4); s.add("foo", integer=4);
s.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -290,7 +287,6 @@ varnish v1 -vcl { ...@@ -290,7 +287,6 @@ varnish v1 -vcl {
s.add("foobarbaz", integer=2); s.add("foobarbaz", integer=2);
s.add("foobar", integer=3); s.add("foobar", integer=3);
s.add("foo", integer=4); s.add("foo", integer=4);
s.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -350,7 +346,6 @@ varnish v1 -vcl { ...@@ -350,7 +346,6 @@ varnish v1 -vcl {
s.add("foobarbaz", integer=2); s.add("foobarbaz", integer=2);
s.add("foobar", integer=3); s.add("foobar", integer=3);
s.add("foo", integer=4); s.add("foo", integer=4);
s.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -403,7 +398,6 @@ varnish v1 -vcl { ...@@ -403,7 +398,6 @@ varnish v1 -vcl {
new s = selector.set(); new s = selector.set();
s.add("foo", integer=0); s.add("foo", integer=0);
s.add("bar"); s.add("bar");
s.compile();
} }
sub vcl_recv { sub vcl_recv {
......
...@@ -12,7 +12,6 @@ varnish v1 -vcl { ...@@ -12,7 +12,6 @@ varnish v1 -vcl {
s.add("bar"); s.add("bar");
s.add("baz"); s.add("baz");
s.add("quux"); s.add("quux");
s.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -102,6 +101,17 @@ client c1 { ...@@ -102,6 +101,17 @@ client c1 {
expect resp.http.Which-Unique == resp.http.Which expect resp.http.Which-Unique == resp.http.Which
} -run } -run
varnish v1 -errvcl {vmod selector failure: s set initialization: allow_overlaps is false but strings with common prefixes were added} {
import ${vmod_selector};
backend b None;
sub vcl_init {
new s = selector.set(allow_overlaps=false);
s.add("foobar");
s.add("foo");
}
}
varnish v1 -errvcl {vmod selector failure: s.compile(): allow_overlaps is false but strings with common prefixes were added} { varnish v1 -errvcl {vmod selector failure: s.compile(): allow_overlaps is false but strings with common prefixes were added} {
import ${vmod_selector}; import ${vmod_selector};
backend b None; backend b None;
...@@ -123,6 +133,5 @@ varnish v1 -vcl { ...@@ -123,6 +133,5 @@ varnish v1 -vcl {
s.add("foofighters"); s.add("foofighters");
s.add("foodfight"); s.add("foodfight");
s.add("foobar"); s.add("foobar");
s.compile();
} }
} }
...@@ -14,7 +14,6 @@ varnish v1 -vcl { ...@@ -14,7 +14,6 @@ varnish v1 -vcl {
s.add("baz", regex="zab"); s.add("baz", regex="zab");
s.add("quux", regex="xuuq"); s.add("quux", regex="xuuq");
s.add("foobar", regex="raboof"); s.add("foobar", regex="raboof");
s.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -279,7 +278,6 @@ varnish v1 -vcl { ...@@ -279,7 +278,6 @@ varnish v1 -vcl {
s.add("foobarbaz", regex="bar"); s.add("foobarbaz", regex="bar");
s.add("foobar", regex="baz"); s.add("foobar", regex="baz");
s.add("foo", regex="quux"); s.add("foo", regex="quux");
s.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -431,7 +429,6 @@ varnish v1 -vcl { ...@@ -431,7 +429,6 @@ varnish v1 -vcl {
new s = selector.set(); new s = selector.set();
s.add("foo", regex="foo"); s.add("foo", regex="foo");
s.add("bar"); s.add("bar");
s.compile();
} }
sub vcl_recv { sub vcl_recv {
......
...@@ -14,7 +14,6 @@ varnish v1 -vcl { ...@@ -14,7 +14,6 @@ varnish v1 -vcl {
s.add("baz", string="zab"); s.add("baz", string="zab");
s.add("quux", string="xuuq"); s.add("quux", string="xuuq");
s.add("foobar", string="raboof"); s.add("foobar", string="raboof");
s.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -182,7 +181,6 @@ varnish v1 -vcl { ...@@ -182,7 +181,6 @@ varnish v1 -vcl {
s.add("foobarbaz", string="2"); s.add("foobarbaz", string="2");
s.add("foobar", string="3"); s.add("foobar", string="3");
s.add("foo", string="4"); s.add("foo", string="4");
s.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -350,7 +348,6 @@ varnish v1 -vcl { ...@@ -350,7 +348,6 @@ varnish v1 -vcl {
new s = selector.set(); new s = selector.set();
s.add("foo", string="foo"); s.add("foo", string="foo");
s.add("bar"); s.add("bar");
s.compile();
} }
sub vcl_recv { sub vcl_recv {
......
...@@ -14,7 +14,6 @@ varnish v1 -vcl { ...@@ -14,7 +14,6 @@ varnish v1 -vcl {
s.add("baz", regex="$"); s.add("baz", regex="$");
s.add("quux", regex=".*"); s.add("quux", regex=".*");
s.add("foobar", regex=":.*"); s.add("foobar", regex=":.*");
s.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -109,7 +108,6 @@ varnish v1 -vcl { ...@@ -109,7 +108,6 @@ varnish v1 -vcl {
s.add("6", regex="ping"); s.add("6", regex="ping");
s.add("7", regex="(?<=[&\?])(foo|bar)=[^&]+(?:&|$)"); s.add("7", regex="(?<=[&\?])(foo|bar)=[^&]+(?:&|$)");
s.add("8", regex="\??(p|pi)=.*?(&|$)"); s.add("8", regex="\??(p|pi)=.*?(&|$)");
s.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -152,7 +150,6 @@ varnish v1 -vcl { ...@@ -152,7 +150,6 @@ varnish v1 -vcl {
sub vcl_init { sub vcl_init {
new s = selector.set(); new s = selector.set();
s.add("foo", regex="bar"); s.add("foo", regex="bar");
s.compile();
} }
sub vcl_recv { sub vcl_recv {
...@@ -232,14 +229,12 @@ varnish v1 -vcl { ...@@ -232,14 +229,12 @@ varnish v1 -vcl {
rewrite1.add("/alpha/beta", regex="(\?.*)\bfoo=[^&]+&?(.*)$"); rewrite1.add("/alpha/beta", regex="(\?.*)\bfoo=[^&]+&?(.*)$");
rewrite1.add("/delta/gamma", regex="(\?.*)\bbar=[^&]+&?(.*)$"); rewrite1.add("/delta/gamma", regex="(\?.*)\bbar=[^&]+&?(.*)$");
rewrite1.add("/epsilon/zeta", regex="(\?.*)\bbaz=[^&]+&?(.*)$"); rewrite1.add("/epsilon/zeta", regex="(\?.*)\bbaz=[^&]+&?(.*)$");
rewrite1.compile();
new rewrite2 = selector.set(); new rewrite2 = selector.set();
rewrite2.add("/foo/", regex="^(/foo)/([^/]+)/([^/]+)/"); rewrite2.add("/foo/", regex="^(/foo)/([^/]+)/([^/]+)/");
rewrite2.add("/foo/bar/", regex="^(/foo/bar)/([^/]+)/([^/]+)/"); rewrite2.add("/foo/bar/", regex="^(/foo/bar)/([^/]+)/([^/]+)/");
rewrite2.add("/foo/bar/baz/", rewrite2.add("/foo/bar/baz/",
regex="^(/foo/bar/baz)/([^/]+)/([^/]+)/"); regex="^(/foo/bar/baz)/([^/]+)/([^/]+)/");
rewrite2.compile();
} }
sub vcl_recv { sub vcl_recv {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment