Skip to content

Commit ac87bcb

Browse files
committed
Stop binding proxy containers to different ports
than 80 since they're no longer running simultaneously. This simplifies the Docker setup and the integration tests.
1 parent 3e9a052 commit ac87bcb

File tree

6 files changed

+3
-14
lines changed

6 files changed

+3
-14
lines changed

Diff for: hosts/proxy/base64-secret/host_port

-1
This file was deleted.

Diff for: hosts/proxy/config-claim_specs-not-table/host_port

-1
This file was deleted.

Diff for: hosts/proxy/config-unsupported-claim-spec-type/host_port

-1
This file was deleted.

Diff for: hosts/proxy/default/host_port

-1
This file was deleted.

Diff for: scripts/run_proxy_container.sh

+1-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,4 @@ cp -r lib/ $proxy_dir/nginx/lua
2222

2323
echo "${blue}Building the new image${no_color}"
2424
docker build -t="proxy-$proxy_name-image" --force-rm $proxy_dir
25-
26-
host_port="$(cat hosts/proxy/$proxy_name/host_port)"
27-
echo "${blue}Staring new container, binding it to Docker host port $host_port${no_color}"
28-
docker run --name "proxy-$proxy_name" -d -p $host_port:80 --link backend:backend "proxy-$proxy_name-image"
25+
docker run --name "proxy-$proxy_name" -d -p 80:80 --link backend:backend "proxy-$proxy_name-image"

Diff for: test/test_integration.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ var jwt = require('jsonwebtoken');
88
var expect = require('chai').expect;
99
var exec = require('child_process').exec;
1010

11-
var baseUrl = 'http://' + process.env.HOST_IP;
12-
var url, secret, proxyName;
11+
var url = 'http://' + process.env.HOST_IP;
12+
var secret, proxyName;
1313

1414
function runCommand (command, done) {
1515
exec(command, function (err) {
@@ -53,7 +53,6 @@ describe('proxy', function () {
5353

5454
describe("configured with normal secret", function () {
5555
before(function (done) {
56-
url = baseUrl;
5756
secret = 'JWTs are the best!';
5857

5958
proxyName = 'default';
@@ -166,7 +165,6 @@ describe('proxy', function () {
166165

167166
describe("configured with URL-safe base-64 encoded secret", function () {
168167
before(function (done) {
169-
url = baseUrl + ':81';
170168
secret = 'This secret is stored base-64 encoded on the proxy host';
171169

172170
proxyName = 'base64-secret';
@@ -197,7 +195,6 @@ describe('proxy', function () {
197195

198196
describe("configured with claim_specs param that's not a table", function () {
199197
before(function (done) {
200-
url = baseUrl + ':82';
201198
secret = 'JWTs are the best!';
202199

203200
proxyName = 'config-claim_specs-not-table';
@@ -238,7 +235,6 @@ describe('proxy', function () {
238235

239236
describe("configured with claim_specs param that contains a spec that's not a pattern (string) or table", function () {
240237
before(function (done) {
241-
url = baseUrl + ':83';
242238
secret = 'JWTs are the best!';
243239

244240
proxyName = 'config-unsupported-claim-spec-type';

0 commit comments

Comments
 (0)