diff --git a/package.json b/package.json index 555f4ae16..ea610ae4c 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,6 @@ "test:e2e:no-goth": "jest tests/e2e/**.spec.ts --testTimeout=180000 --runInBand --forceExit", "test:cypress": "cypress run", "test:examples": "ts-node --project tsconfig.spec.json tests/examples/examples.test.ts", - "test:examples:no-goth": "ts-node --project tsconfig.spec.json tests/examples/examples.test.ts --no-goth", "lint": "npm run lint:ts && npm run lint:ts:tests && npm run lint:eslint", "lint:ts": "tsc --project tsconfig.json --noEmit", "lint:ts:tests": "tsc --project tests/tsconfig.json --noEmit", diff --git a/tests/e2e/Requestor.Dockerfile b/tests/e2e/Requestor.Dockerfile index e4388b8b0..33670374f 100644 --- a/tests/e2e/Requestor.Dockerfile +++ b/tests/e2e/Requestor.Dockerfile @@ -12,6 +12,7 @@ RUN apt-get update -q \ ca-certificates \ xz-utils \ curl \ + sshpass \ python3 \ && apt-get remove --purge -y \ && apt-get clean -y \ diff --git a/tests/e2e/data-node/ya-provider/presets.json b/tests/e2e/data-node/ya-provider/presets.json index a2f8810cd..e360c9cb2 100644 --- a/tests/e2e/data-node/ya-provider/presets.json +++ b/tests/e2e/data-node/ya-provider/presets.json @@ -6,7 +6,7 @@ "exeunit-name": "wasmtime", "pricing-model": "linear", "usage-coeffs": { - "cpu": 3.000000001, + "cpu": 0.500000001, "duration": 0.0, "initial": 0.0 } @@ -16,7 +16,7 @@ "exeunit-name": "vm", "pricing-model": "linear", "usage-coeffs": { - "cpu": 3.000000001, + "cpu": 0.500000001, "duration": 0.0, "initial": 0.0 } @@ -26,7 +26,7 @@ "exeunit-name": "wasmtime", "pricing-model": "linear", "usage-coeffs": { - "cpu": 3.000000001, + "cpu": 0.500000001, "duration": 0.0, "initial": 0.0 } diff --git a/tests/e2e/docker-compose.yml b/tests/e2e/docker-compose.yml index 39782c9f4..635d6cedf 100644 --- a/tests/e2e/docker-compose.yml +++ b/tests/e2e/docker-compose.yml @@ -55,11 +55,11 @@ services: - /root/.local/share/yagna/ - ../../:/golem-js environment: - - YAGNA_AUTOCONF_APPKEY=e2e-test + - YAGNA_AUTOCONF_APPKEY=try_golem - YAGNA_API_URL=http://0.0.0.0:7465 - GSB_URL=tcp://0.0.0.0:7464 - YAGNA_SUBNET=${YAGNA_SUBNET:-golemjstest} - - YAGNA_APPKEY=e2e-test + - YAGNA_APPKEY=try_golem healthcheck: test: ["CMD-SHELL", "curl -s -o /dev/null -w '%{http_code}' http://localhost:7465 | grep -q 401"] diff --git a/tests/examples/examples.test.ts b/tests/examples/examples.test.ts index e61e534b2..cfb6f30ef 100644 --- a/tests/examples/examples.test.ts +++ b/tests/examples/examples.test.ts @@ -1,15 +1,8 @@ import { spawn } from "child_process"; import { dirname, basename, resolve } from "path"; -import { Goth } from "../goth/goth"; import chalk from "chalk"; import testExamples from "./examples.json"; -const noGoth = process.argv[2] === "--no-goth"; -const gothConfig = resolve("../goth/assets/goth-config.yml"); -const gothStartingTimeout = 180; -const goth = new Goth(gothConfig); - -const examples = !noGoth ? testExamples.filter((e) => !e?.noGoth) : testExamples; const criticalLogsRegExp = [/Task *. timeot/, /Task *. has been rejected/, /ERROR: TypeError/, /ERROR: Error/gim]; type Example = { @@ -17,7 +10,6 @@ type Example = { path: string; args?: string[]; timeout?: number; - noGoth?: boolean; skip?: boolean; }; @@ -62,16 +54,6 @@ async function test(cmd: string, path: string, args: string[] = [], timeout = 18 async function testAll(examples: Example[]) { const failedTests = new Set(); const skippedTests = new Set(); - if (!noGoth) - await Promise.race([ - goth.start(), - new Promise((res, rej) => - setTimeout( - () => rej(new Error(`The Goth starting timeout was reached after ${gothStartingTimeout} seconds`)), - gothStartingTimeout * 1000, - ), - ), - ]); for (const example of examples) { try { console.log(chalk.yellow(`\n---- Starting test: "${example.path}" ----\n`)); @@ -87,7 +69,6 @@ async function testAll(examples: Example[]) { failedTests.add(example.path); } } - if (!noGoth) await goth.end().catch((error) => console.error(error)); console.log( chalk.bold.yellow("\n\nTESTS RESULTS: "), chalk.bgGreen.black(` ${examples.length - failedTests.size - skippedTests.size} passed `), @@ -102,4 +83,4 @@ async function testAll(examples: Example[]) { process.exit(failedTests.size > 0 ? 1 : 0); } -testAll(examples).then(); +testAll(testExamples).then();