Explorar o código

Merge pull request #3329 from overleaf/em-fix-smoke-tests

Fix smoke tests when Settings.web is unset

GitOrigin-RevId: 873ee49a8bd57ed5f4c5bd0a551b724530424711
Eric Mc Sween %!s(int64=6) %!d(string=hai) anos
pai
achega
14f8a3ca72
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      services/web/test/smoke/src/SmokeTests.js

+ 1 - 1
services/web/test/smoke/src/SmokeTests.js

@@ -21,7 +21,7 @@ if (Object.prototype.should == null) {
 const { expect } = chai
 const { expect } = chai
 const Settings = require('settings-sharelatex')
 const Settings = require('settings-sharelatex')
 let ownPort = Settings.internal.web.port || Settings.port || 3000
 let ownPort = Settings.internal.web.port || Settings.port || 3000
-const port = Settings.web.web_router_port || ownPort // send requests to web router if this is the api process
+const port = (Settings.web && Settings.web.web_router_port) || ownPort // send requests to web router if this is the api process
 const cookeFilePath = `/tmp/smoke-test-cookie-${ownPort}-to-${port}.txt`
 const cookeFilePath = `/tmp/smoke-test-cookie-${ownPort}-to-${port}.txt`
 const buildUrl = path =>
 const buildUrl = path =>
   ` -b ${cookeFilePath} --resolve 'smoke${
   ` -b ${cookeFilePath} --resolve 'smoke${