[master] 0e50763 Add better coverage test of vcc_backend.c

Poul-Henning Kamp phk at varnish-cache.org
Mon Aug 19 15:22:52 CEST 2013


commit 0e507635925252ff112e7ff0aa034fd595011fb0
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Aug 19 13:22:23 2013 +0000

    Add better coverage test of vcc_backend.c

diff --git a/bin/varnishtest/tests/v00038.vtc b/bin/varnishtest/tests/v00038.vtc
new file mode 100644
index 0000000..c155119
--- /dev/null
+++ b/bin/varnishtest/tests/v00038.vtc
@@ -0,0 +1,67 @@
+varnishtest "VCL compiler coverage test: vcc_backend.c
+
+varnish v1 -errvcl "IPv6 address [] wrong" {
+	backend b1 {
+		.host = "[0:0:0:0";
+	}
+}
+
+varnish v1 -errvcl "with exactly three digits" {
+	backend b1 {
+		.host = "127.0.0.1";
+		.probe = {
+			.expected_response = 1000;
+		}
+	}
+}
+
+varnish v1 -errvcl "Must specify .threshold with .window" {
+	backend b1 {
+		.host = "127.0.0.1";
+		.probe = {
+			.window = 32;
+		}
+	}
+}
+
+varnish v1 -errvcl "Threshold must be 64 or less" {
+	backend b1 {
+		.host = "127.0.0.1";
+		.probe = {
+			.threshold = 65;
+		}
+	}
+}
+
+varnish v1 -errvcl "Window must be 64 or less" {
+	backend b1 {
+		.host = "127.0.0.1";
+		.probe = {
+			.window = 65;
+			.threshold = 64;
+		}
+	}
+}
+
+varnish v1 -errvcl "Threshold can not be greater than window" {
+	backend b1 {
+		.host = "127.0.0.1";
+		.probe = {
+			.window = 63;
+			.threshold = 64;
+		}
+	}
+}
+
+varnish v1 -errvcl "NB: Backend Syntax has changed:" {
+	backend b1 {
+		set .host = "127.0.0.1";
+	}
+}
+
+varnish v1 -errvcl "Expected '{' or name of probe." {
+	backend b1 {
+		.host = "127.0.0.1";
+		.probe = "NONE";
+	}
+}



More information about the varnish-commit mailing list