alphagov/cdn-acceptance-tests — pull request #77 by dcarley (2014-08-01 08:24:01+00:00)
Title: [#75799284] Improve TestMiscProtocolRedirect

Principally to add query params to our request in order to test that they
are preserved in the redirect. This was broken once upon a time in our
Akamai config, so we should guard against it happening again:

- https://www.pivotaltracker.com/story/show/52034601
- https://www.pivotaltracker.com/n/projects/367813/stories/51190265
- https://govuk.zendesk.com/agent/#/tickets/96628

This has the added benefits of:

- Ensuring that we use a unique URL on each test run and don't get a
potentially cached (either by edge or an intermediary) result.
- Making this test look like the others by using the `NewUniqueEdgeGET()`
helper and not touching `*edgeHost` directly.

NB: The `req` object is repurposed after making the request because we no
longer need it to make any more requests. This seems simpler and less error
prone than attempting to deep-copy the URL struct by doing a pointer-deref.