- Make up a simple proxy server (see below).
- We give that a DNS entry Eg,
next-signup-test-suite.ft.com
- Create a single Zuora configuaration, valid for that host.
- The proxy server forms a URL from a
ft-heroku-backend
header sent by each test suite + path of the original request and proxies that request to the temporary Heroku backend.
- As long as the proxy server does not cache any requests we should be able to spin up as many concurrent branches as we need.
var https = require('https');
var app = require('express');
app.get('/:path*', function(req, res) {
var url = 'https://' + req.get('ft-heroku-backend') + '/' + req.path;
https.get(url, function(proxyRes) {
proxyRes.pipe(res);
});
});