From 22ed7d302436f46d18db9c882d01ccd4b25f5784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw=20Sadzi=C5=84ski?= Date: Fri, 12 Aug 2022 17:23:22 +0200 Subject: [PATCH] Skipping tests that can't be run on external server. --- package.json | 2 +- test/nbrowser/ReferenceColumns.ts | 3 +++ test/nbrowser/ReferenceList.ts | 3 +++ test/nbrowser/testServer.ts | 3 +++ test/test_under_docker.sh | 2 +- 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 915aa222..b143b21e 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "install:python3": "buildtools/prepare_python3.sh", "build:prod": "buildtools/build.sh", "start:prod": "sandbox/run.sh", - "test": "GRIST_SESSION_COOKIE=grist_test_cookie GRIST_TEST_LOGIN=1 TEST_SUPPORT_API_KEY=api_key_for_support TEST_CLEAN_DATABASE=true NODE_PATH=_build:_build/stubs:_build/ext mocha -g ${GREP_TEST:-''} _build/test/nbrowser/*.js _build/test/server/**/*.js _build/test/gen-server/**/*.js", + "test": "GRIST_SESSION_COOKIE=grist_test_cookie GRIST_TEST_LOGIN=1 TEST_SUPPORT_API_KEY=api_key_for_support TEST_CLEAN_DATABASE=true NODE_PATH=_build:_build/stubs:_build/ext mocha -g ${GREP_TESTS:-''} _build/test/nbrowser/*.js _build/test/server/**/*.js _build/test/gen-server/**/*.js", "test:server": "GRIST_SESSION_COOKIE=grist_test_cookie NODE_PATH=_build:_build/stubs:_build/ext mocha _build/test/server/**/*.js _build/test/gen-server/**/*.js", "test:smoke": "NODE_PATH=_build:_build/stubs:_build/ext mocha _build/test/nbrowser/Smoke.js", "test:docker": "./test/test_under_docker.sh", diff --git a/test/nbrowser/ReferenceColumns.ts b/test/nbrowser/ReferenceColumns.ts index 6cd48285..5f9d09ca 100644 --- a/test/nbrowser/ReferenceColumns.ts +++ b/test/nbrowser/ReferenceColumns.ts @@ -70,6 +70,9 @@ describe('ReferenceColumns', function() { }); it('should allow entering numeric id before target table is loaded', async function() { + if (server.isExternalServer()) { + this.skip(); + } // Refresh the document. await driver.navigate().refresh(); await gu.waitForDocToLoad(); diff --git a/test/nbrowser/ReferenceList.ts b/test/nbrowser/ReferenceList.ts index c2e98600..2a43ce63 100644 --- a/test/nbrowser/ReferenceList.ts +++ b/test/nbrowser/ReferenceList.ts @@ -298,6 +298,9 @@ describe('ReferenceList', function() { }); it('should allow entering numeric id before target table is loaded', async function() { + if (server.isExternalServer()) { + this.skip(); + } // Refresh the document. await driver.navigate().refresh(); await gu.waitForDocToLoad(); diff --git a/test/nbrowser/testServer.ts b/test/nbrowser/testServer.ts index 9e483376..ea3684cc 100644 --- a/test/nbrowser/testServer.ts +++ b/test/nbrowser/testServer.ts @@ -176,6 +176,9 @@ export class TestServerMerged implements IMochaServer { * request takes a long time. */ public async pauseUntil(callback: () => Promise) { + if (this.isExternalServer()) { + throw new Error("Can't pause external server"); + } log.info("Pausing node server"); this._server.kill('SIGSTOP'); try { diff --git a/test/test_under_docker.sh b/test/test_under_docker.sh index 6e97c171..e2db8131 100755 --- a/test/test_under_docker.sh +++ b/test/test_under_docker.sh @@ -64,4 +64,4 @@ TEST_ADD_SAMPLES=1 TEST_ACCOUNT_PASSWORD=not-needed \ GRIST_SESSION_COOKIE=grist_test_cookie \ GRIST_TEST_LOGIN=1 \ NODE_PATH=_build:_build/stubs \ - $MOCHA _build/test/nbrowser/*.js "$@" + $MOCHA _build/test/nbrowser/*.js -g ${GREP_TESTS:-''} "$@"