[master] 75802e2 Add a debug.no_backend() function to simulate a director failing to pick a backend.
Poul-Henning Kamp
phk at FreeBSD.org
Mon May 19 09:15:42 CEST 2014
commit 75802e279457d209e59bdd3d26aceb59bb214715
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon May 19 07:14:50 2014 +0000
Add a debug.no_backend() function to simulate a director failing to
pick a backend.
diff --git a/lib/libvmod_debug/vmod.vcc b/lib/libvmod_debug/vmod.vcc
index 6872775..8667298 100644
--- a/lib/libvmod_debug/vmod.vcc
+++ b/lib/libvmod_debug/vmod.vcc
@@ -59,6 +59,10 @@ $Function STRING blob2hex(BLOB)
Hexdump a blob
+$Function BACKEND no_backend()
+
+Fails at backend selection
+
$Object obj(STRING)
Test object
diff --git a/lib/libvmod_debug/vmod_debug.c b/lib/libvmod_debug/vmod_debug.c
index 146f46b..b3e8334 100644
--- a/lib/libvmod_debug/vmod_debug.c
+++ b/lib/libvmod_debug/vmod_debug.c
@@ -129,3 +129,12 @@ vmod_blob2hex(const struct vrt_ctx *ctx, VCL_BLOB b)
VRT_priv_fini(b);
return (s);
}
+
+VCL_BACKEND
+vmod_no_backend(const struct vrt_ctx *ctx)
+{
+
+ CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
+ return (NULL);
+}
+
More information about the varnish-commit
mailing list