[master] 480c5d2dc vtc: Move vmod_std coverage to the vmod/ tree
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Fri Sep 10 12:45:07 UTC 2021
commit 480c5d2dc32291208491df2f74d92a409ee3156f
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Fri Sep 10 14:27:08 2021 +0200
vtc: Move vmod_std coverage to the vmod/ tree
diff --git a/bin/varnishtest/tests/README b/bin/varnishtest/tests/README
index 4070daf05..0f78207b7 100644
--- a/bin/varnishtest/tests/README
+++ b/bin/varnishtest/tests/README
@@ -25,7 +25,7 @@ Naming scheme
id ~ ^i --> Interoperability and standards compliance
id ~ ^j --> JAIL tests
id ~ ^l --> VSL tests
- id ~ ^m --> VMOD tests excluding director
+ id ~ ^m --> VMOD facility, vmod_debug and vmod_vtc
id ~ ^o --> prOxy protocol
id ~ ^p --> Persistent tests
id ~ ^r --> Regression tests, same number as ticket
diff --git a/bin/varnishtest/tests/m00000.vtc b/bin/varnishtest/tests/m00000.vtc
index 3cc101a62..fb3a90e3d 100644
--- a/bin/varnishtest/tests/m00000.vtc
+++ b/bin/varnishtest/tests/m00000.vtc
@@ -99,9 +99,7 @@ logexpect l1 -v v1 -g raw -d 1 {
expect 0 = RespHeader {^not: -1}
expect 0 = RespHeader {^Encrypted: ROT52}
expect 0 = VCL_return {^deliver}
-} -start
-
-logexpect l1 -wait
+} -run
varnish v1 -errvcl {Wrong enum value. Expected one of:} {
import debug;
diff --git a/bin/varnishtest/tests/m00004.vtc b/vmod/tests/std_b00000.vtc
similarity index 100%
rename from bin/varnishtest/tests/m00004.vtc
rename to vmod/tests/std_b00000.vtc
diff --git a/bin/varnishtest/tests/m00005.vtc b/vmod/tests/std_b00002.vtc
similarity index 100%
rename from bin/varnishtest/tests/m00005.vtc
rename to vmod/tests/std_b00002.vtc
diff --git a/bin/varnishtest/tests/m00006.vtc b/vmod/tests/std_b00003.vtc
similarity index 100%
rename from bin/varnishtest/tests/m00006.vtc
rename to vmod/tests/std_b00003.vtc
diff --git a/bin/varnishtest/tests/m00007.vtc b/vmod/tests/std_b00004.vtc
similarity index 100%
rename from bin/varnishtest/tests/m00007.vtc
rename to vmod/tests/std_b00004.vtc
diff --git a/bin/varnishtest/tests/m00011.vtc b/vmod/tests/std_b00005.vtc
similarity index 100%
rename from bin/varnishtest/tests/m00011.vtc
rename to vmod/tests/std_b00005.vtc
diff --git a/bin/varnishtest/tests/m00013.vtc b/vmod/tests/std_b00006.vtc
similarity index 100%
rename from bin/varnishtest/tests/m00013.vtc
rename to vmod/tests/std_b00006.vtc
diff --git a/bin/varnishtest/tests/m00014.vtc b/vmod/tests/std_b00007.vtc
similarity index 100%
rename from bin/varnishtest/tests/m00014.vtc
rename to vmod/tests/std_b00007.vtc
diff --git a/bin/varnishtest/tests/m00015.vtc b/vmod/tests/std_b00008.vtc
similarity index 100%
rename from bin/varnishtest/tests/m00015.vtc
rename to vmod/tests/std_b00008.vtc
diff --git a/bin/varnishtest/tests/m00016.vtc b/vmod/tests/std_b00009.vtc
similarity index 100%
rename from bin/varnishtest/tests/m00016.vtc
rename to vmod/tests/std_b00009.vtc
diff --git a/bin/varnishtest/tests/m00018.vtc b/vmod/tests/std_b00010.vtc
similarity index 100%
rename from bin/varnishtest/tests/m00018.vtc
rename to vmod/tests/std_b00010.vtc
diff --git a/bin/varnishtest/tests/m00020.vtc b/vmod/tests/std_b00011.vtc
similarity index 100%
rename from bin/varnishtest/tests/m00020.vtc
rename to vmod/tests/std_b00011.vtc
diff --git a/bin/varnishtest/tests/m00026.vtc b/vmod/tests/std_b00012.vtc
similarity index 78%
rename from bin/varnishtest/tests/m00026.vtc
rename to vmod/tests/std_b00012.vtc
index 3659eb367..cc341d8cc 100644
--- a/bin/varnishtest/tests/m00026.vtc
+++ b/vmod/tests/std_b00012.vtc
@@ -1,5 +1,7 @@
varnishtest "Test std.getenv"
+setenv FOO "BAR BAZ"
+
varnish v1 -vcl {
import std;
@@ -10,6 +12,7 @@ varnish v1 -vcl {
}
sub vcl_synth {
+ set resp.http.X-FOO = std.getenv("FOO");
set resp.http.X-PATH = std.getenv("PATH");
set resp.http.X-unset = std.getenv(req.http.unset);
}
@@ -18,6 +21,7 @@ varnish v1 -vcl {
client c1 {
txreq
rxresp
+ expect resp.http.X-FOO == "BAR BAZ"
expect resp.http.X-PATH ~ "^/"
expect resp.http.X-unset == ""
} -run
diff --git a/bin/varnishtest/tests/m00029.vtc b/vmod/tests/std_b00013.vtc
similarity index 100%
rename from bin/varnishtest/tests/m00029.vtc
rename to vmod/tests/std_b00013.vtc
diff --git a/bin/varnishtest/tests/m00050.vtc b/vmod/tests/std_b00014.vtc
similarity index 100%
rename from bin/varnishtest/tests/m00050.vtc
rename to vmod/tests/std_b00014.vtc
diff --git a/bin/varnishtest/tests/m00001.vtc b/vmod/tests/std_c00000.vtc
similarity index 99%
rename from bin/varnishtest/tests/m00001.vtc
rename to vmod/tests/std_c00000.vtc
index ac5be793a..a2f779558 100644
--- a/bin/varnishtest/tests/m00001.vtc
+++ b/vmod/tests/std_c00000.vtc
@@ -114,5 +114,3 @@ logexpect l1 -v v1 -g raw -d 1 {
expect 0 = VCL_Log {^01030507090b0d0f11131517191b1d1f21232527292b2d2f31333537393b3d3f41434547494b4d4f51535557595b5d5f61636567696b6d6f71737577797b7d7f81838587898b8d8f91939597999b9d9fa1a3a5a7a9abadafb1b3b5b7b9bbbdbfc1c3c5c7c9cbcdcfd1d3d5d7d9dbdddfe1e3e5e7e9ebedeff1f3f5f7f9fbfd$}
expect 0 = VCL_return {^deliver}
} -run
-
-#logexpect l1 -wait
diff --git a/bin/varnishtest/tests/m00017.vtc b/vmod/tests/std_c00001.vtc
similarity index 100%
rename from bin/varnishtest/tests/m00017.vtc
rename to vmod/tests/std_c00001.vtc
diff --git a/bin/varnishtest/tests/m00046.vtc b/vmod/tests/std_c00002.vtc
similarity index 100%
rename from bin/varnishtest/tests/m00046.vtc
rename to vmod/tests/std_c00002.vtc
More information about the varnish-commit
mailing list