VCL continuous integration

Dridi Boukelmoune dridi.boukelmoune at zenika.com
Thu Aug 21 14:38:40 CEST 2014


On Thu, Aug 21, 2014 at 2:12 PM, L Cruzero <lcruzero at gmail.com> wrote:
>> is anyone on the list using any CI tools or have any ideas possible options
>> for implementing continuous integration with VLC.
>
> I don't know what you're looking for, but one of the tests in our CI suite does
> a Varnish syntax check by calling `varnishd -C -f <filename> -n /tmp 2>&1
> 1>/dev/null` and checking the exit code. Doing much more is difficult because
> Varnish, like other services, is fairly global, as opposed to application code,
> which can be much more easily tested in parallel on a single machine.
>  - P
>
> thanks James, and others for some of the useful suggestions. while
> varnishtest and varnishD respectively,
> will be used as suggested, for testing cache and vcl syntax as part of
> unit tests, in a "bamboo" CI agent. it would also be useful to test,
> perhaps outside of a syntax/cache unit test, some of the external
> resources a vcl config depends on.
>
>
> ie.
>
> -defined backends connectivity.

What do you mean exactly?

> -response header from host header request to defined backends

This is something you can do with varnishtest, use your real vcl on a
test backend, and only mock the client.

I actually have such an example in my test suite for the maven plugin:

https://github.com/Zenika/varnishtest-exec/tree/master/varnishtest-maven-plugin/src/it/run-war

You can see in the POM that I'm running the dummy webapp during the
pre-integration-test phase, and shutting it down during the
post-integration-test phase. The varnishtest-maven-plugin is
automatically bound to the integration-test phase:

https://github.com/Zenika/varnishtest-exec/blob/812d894/varnishtest-maven-plugin/src/it/run-war/pom.xml

And a dummy varnishtest case:

https://github.com/Zenika/varnishtest-exec/blob/812d894/varnishtest-maven-plugin/src/it/run-war/src/test/varnish/test.vtc

If it's possible to do that with a twisted build system like maven
(don't get me started;-) you should be able to do the same.

Cheers,
Dridi

> thanks.
>
> -LC



More information about the varnish-misc mailing list