From 87ad26ce09e7b47624e89159ce47ad0e82e01d01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Mon, 25 Mar 2019 18:57:56 +0100 Subject: [PATCH] Add CLIENT_URI to the to-be-tested server Our ActivityPub service needs to know the public URI how 3rd party servers can reach the server. At the moment, we have this configuration: https://nitro-staging.human-connection.org/activityPub (external) => http://nitro-backend.human-connection:4000 (internal) So, when the backend generates links, they will have the external URI as a prefix. This commit might be a little dirty, because CLIENT_URI will be different now for frontend and backend during testing. I hope this does not add extra confusion. It seems that our cypress tests are not affected by this change. --- backend/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/package.json b/backend/package.json index 5209c71f4..6bd5db20f 100644 --- a/backend/package.json +++ b/backend/package.json @@ -14,7 +14,7 @@ "lint": "eslint src --config .eslintrc.js", "test": "nyc --reporter=text-lcov yarn test:jest", "test:cypress": "run-p --race test:before:*", - "test:before:server": "cross-env GRAPHQL_URI=http://localhost:4123 GRAPHQL_PORT=4123 babel-node src/ 2> /dev/null", + "test:before:server": "cross-env CLIENT_URI=http://localhost:4123 GRAPHQL_URI=http://localhost:4123 GRAPHQL_PORT=4123 babel-node src/ 2> /dev/null", "test:before:seeder": "cross-env GRAPHQL_URI=http://localhost:4001 GRAPHQL_PORT=4001 PERMISSIONS=disabled babel-node src/ 2> /dev/null", "test:jest:cmd": "wait-on tcp:4001 tcp:4123 && jest --forceExit --detectOpenHandles --runInBand", "test:cucumber:cmd": "wait-on tcp:4001 tcp:4123 && cucumber-js --require-module @babel/register --exit test/",