From c25eced03b5cc0409ac3436ee3a65e5995eea69c Mon Sep 17 00:00:00 2001 From: Jeromy Cannon Date: Fri, 11 Oct 2024 11:12:35 +0100 Subject: [PATCH 1/2] delete file that got added back in during merge Signed-off-by: Jeromy Cannon --- .../keytool_dependency_manager.test.mjs | 72 ------------------- 1 file changed, 72 deletions(-) delete mode 100644 test/e2e/integration/core/dependency_managers/keytool_dependency_manager.test.mjs diff --git a/test/e2e/integration/core/dependency_managers/keytool_dependency_manager.test.mjs b/test/e2e/integration/core/dependency_managers/keytool_dependency_manager.test.mjs deleted file mode 100644 index d6e4e2de7..000000000 --- a/test/e2e/integration/core/dependency_managers/keytool_dependency_manager.test.mjs +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (C) 2024 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the ""License""); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an ""AS IS"" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -import { it, describe, after, before } from 'mocha' -import { expect } from 'chai' - -import fs from 'fs' -import path from 'path' -import { KeytoolDependencyManager } from '../../../../../src/core/dependency_managers/index.mjs' -import { PackageDownloader, Zippy } from '../../../../../src/core/index.mjs' -import { getTestCacheDir, testLogger } from '../../../../test_util.js' -import os from 'os' -import { MINUTES } from '../../../../../src/core/constants.mjs' - -describe('KeytoolDependencyManager', () => { - const downloader = new PackageDownloader(testLogger) - const tmpDir = path.join(getTestCacheDir(), 'bin', 'jre') - const zippy = new Zippy(testLogger) - - before(() => { - if (fs.existsSync(tmpDir)) { - fs.rmSync(tmpDir, { recursive: true }) - } - fs.mkdirSync(tmpDir, { recursive: true }) - }) - - after(() => { - if (fs.existsSync(tmpDir)) { - fs.rmSync(tmpDir, { recursive: true }) - } - }) - - it('should be able to install keytool base on os and architecture', async () => { - let osPlatform = '' - let osArch = '' - switch (os.platform()) { - case 'linux': - osPlatform = 'linux' - osArch = 'x64' - break - case 'darwin': - osPlatform = 'darwin' - osArch = 'arm64' - break - case 'win32': - osPlatform = 'windows' - osArch = 'x64' - break - default: - throw new Error('Unsupported platform') - } - const keytoolDependencyManager = new KeytoolDependencyManager( - downloader, zippy, testLogger, tmpDir, osPlatform, osArch) - await keytoolDependencyManager.uninstall() - expect(keytoolDependencyManager.isInstalled()).not.to.be.ok - await expect(keytoolDependencyManager.install(getTestCacheDir())).to.eventually.be.ok - expect(keytoolDependencyManager.isInstalled()).to.be.ok - }).timeout(2 * MINUTES) -}) From c4fd4de6b044520d088df74caeed43161ab72c6a Mon Sep 17 00:00:00 2001 From: Jeromy Cannon Date: Fri, 11 Oct 2024 11:24:37 +0100 Subject: [PATCH 2/2] updated to make integration work correctly and have standard not duplicate run of integration folder Signed-off-by: Jeromy Cannon --- .github/workflows/templates/config.yaml | 4 ++-- package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/templates/config.yaml b/.github/workflows/templates/config.yaml index 3798a0e90..89dd5531e 100644 --- a/.github/workflows/templates/config.yaml +++ b/.github/workflows/templates/config.yaml @@ -4,10 +4,10 @@ tests: # name: capitalized noun form # testFilePrefix: node-update # for node-update.test.mjs - name: Integration - mochaPostfix: "--grep '.*\\/e2e\\/integration\\/.*'" + mochaPostfix: "'test/e2e/integration/**/*.mjs'" - name: Standard - mochaPostfix: "'test/e2e/**/*.mjs' --ignore 'test/unit/**/*.mjs' --ignore 'test/e2e/commands/mirror_node*.mjs' --ignore 'test/e2e/commands/node*.mjs' --ignore 'test/e2e/commands/separate_node*.mjs' --ignore 'test/e2e/commands/relay*.mjs'" + mochaPostfix: "'test/e2e/**/*.mjs' --ignore 'test/unit/**/*.mjs' --ignore 'test/e2e/integration/**/*.mjs' --ignore 'test/e2e/commands/mirror_node*.mjs' --ignore 'test/e2e/commands/node*.mjs' --ignore 'test/e2e/commands/separate_node*.mjs' --ignore 'test/e2e/commands/relay*.mjs'" timeout: 30000 - name: Mirror Node diff --git a/package.json b/package.json index 42294fefb..0989ef6dd 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "scripts": { "test": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Unit Tests\" c8 --reporter=text --reporter=html --report-dir='coverage/unit' mocha --recursive --file 'test/setup.mjs' 'test/unit/**/*.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit.xml --check-leaks --timeout 20000", "test-e2e-all": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E All Tests\" nyc --reporter=text --reporter=html --report-dir='coverage/e2e-all' mocha --recursive --file 'test/setup.mjs' 'test/e2e/**/*.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-all.xml --check-leaks --timeout 20000", - "test-e2e-integration": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Integration Tests\" c8 --reporter=clover --reporter=lcov --reporter=text --report-dir='coverage/e2e-integration' mocha --verbose --recursive --file 'test/setup.mjs' --grep '.*\/e2e\/integration\/.*' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-integration.xml --check-leaks --timeout 20000", - "test-e2e-standard": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Standard Tests\" c8 --reporter=clover --reporter=lcov --reporter=text --report-dir='coverage/e2e-standard' mocha --verbose --recursive --file 'test/setup.mjs' 'test/e2e/**/*.mjs' --ignore 'test/unit/**/*.mjs' --ignore 'test/e2e/commands/mirror_node*.mjs' --ignore 'test/e2e/commands/node*.mjs' --ignore 'test/e2e/commands/separate_node*.mjs' --ignore 'test/e2e/commands/relay*.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-standard.xml --check-leaks --timeout 30000", + "test-e2e-integration": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Integration Tests\" c8 --reporter=clover --reporter=lcov --reporter=text --report-dir='coverage/e2e-integration' mocha --verbose --recursive --file 'test/setup.mjs' 'test/e2e/integration/**/*.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-integration.xml --check-leaks --timeout 20000", + "test-e2e-standard": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Standard Tests\" c8 --reporter=clover --reporter=lcov --reporter=text --report-dir='coverage/e2e-standard' mocha --verbose --recursive --file 'test/setup.mjs' 'test/e2e/**/*.mjs' --ignore 'test/unit/**/*.mjs' --ignore 'test/e2e/integration/**/*.mjs' --ignore 'test/e2e/commands/mirror_node*.mjs' --ignore 'test/e2e/commands/node*.mjs' --ignore 'test/e2e/commands/separate_node*.mjs' --ignore 'test/e2e/commands/relay*.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-standard.xml --check-leaks --timeout 30000", "test-e2e-mirror-node": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Mirror Node Tests\" c8 --reporter=clover --reporter=lcov --reporter=text --report-dir='coverage/e2e-mirror-node' mocha --verbose --recursive --file 'test/setup.mjs' 'test/e2e/commands/mirror_node.test.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-mirror-node.xml --check-leaks --timeout 20000", "test-e2e-node-pem-stop": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Node PEM Stop Tests\" c8 --reporter=clover --reporter=lcov --reporter=text --report-dir='coverage/e2e-node-pem-stop' mocha --verbose --recursive --file 'test/setup.mjs' 'test/e2e/commands/node_pem_stop.test.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-node-pem-stop.xml --check-leaks --timeout 20000", "test-e2e-node-pem-kill": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Node PEM Kill Tests\" c8 --reporter=clover --reporter=lcov --reporter=text --report-dir='coverage/e2e-node-pem-kill' mocha --verbose --recursive --file 'test/setup.mjs' 'test/e2e/commands/node_pem_kill.test.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-node-pem-kill.xml --check-leaks --timeout 20000",