alphagov/cdn-acceptance-tests — pull request #35 by dcarley (2014-06-13 09:54:50+00:00)
Title: Implement test(s) for X-Forwarded-For

I've decided to collapse the two tests together because it's much easier to
construct the expected value of the "append" test when we know what our
reported IP address is from the "create" test. Compared to testing the
number of items and whether they are each a valid IP address.

This test currently fails against our Fastly configuration because we appear
to be appending the same IP twice. I'll raise a bug in Pivotal for that:

cdn@gds-cdn-noodle:~/dan$ go test -edgeHost fastly.cdn-acceptance-test.alphagov.co.uk -skipVerifyTLS -v -run XFF
2014/06/13 05:43:40 Confirming that CDN is healthy
=== RUN TestHeaderXFFCreateAndAppend
--- FAIL: TestHeaderXFFCreateAndAppend (0.00 seconds)
cdn_acceptance_test.go:86: Expected origin to receive "X-Forwarded-For" header with single IP. Got "80.240.128.97, 80.240.128.97"