Skip to content

Commit

Permalink
chore: fix e2e
Browse files Browse the repository at this point in the history
Signed-off-by: Ivo Yankov <[email protected]>
  • Loading branch information
Ivo-Yankov committed Sep 30, 2024
1 parent d6f30de commit 7680dbe
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions test/e2e/commands/node_upgrade.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
} from '../../test_util.js'
import { getNodeLogs, getTmpDir } from '../../../src/core/helpers.mjs'
import { NodeCommand } from '../../../src/commands/node.mjs'

Check failure on line 28 in test/e2e/commands/node_upgrade.test.mjs

View workflow job for this annotation

GitHub Actions / Code Style / Standard

'NodeCommand' is defined but never used
import { PREPARE_UPGRADE_CONFIGS_NAME, DOWNLOAD_GENERATED_FILES_CONFIGS_NAME } from '../../../src/commands/node/configs.mjs'
import { HEDERA_HAPI_PATH, ROOT_CONTAINER } from '../../../src/core/constants.mjs'
import fs from 'fs'

Expand Down Expand Up @@ -60,25 +61,31 @@ describe('Node upgrade', () => {

it('should prepare network upgrade successfully', async () => {
await nodeCmd.prepareUpgrade(upgradeArgv)
expect(nodeCmd.getUnusedConfigs(PREPARE_UPGRADE_CONFIGS_NAME)).toEqual([
flags.app.constName,
flags.devMode.constName,
flags.endpointType.constName
])
}, 300000)

it('should download generated files successfully', async () => {
await nodeCmd.downloadGeneratedFiles(upgradeArgv)
expect(nodeCmd.getUnusedConfigs(DOWNLOAD_GENERATED_FILES_CONFIGS_NAME)).toEqual([
flags.app.constName,
flags.devMode.constName,
flags.endpointType.constName
])
}, 300000)

it('should upgrade all nodes on the network successfully', async () => {
await nodeCmd.freezeUpgrade(upgradeArgv)
}, 300000)


it('should have accesses only the expected config properties', async () => {
await nodeCmd.accountManager.close()
expect(nodeCmd.getUnusedConfigs(NodeCommand.DELETE_CONFIGS_NAME)).toEqual([
expect(nodeCmd.getUnusedConfigs(PREPARE_UPGRADE_CONFIGS_NAME)).toEqual([
flags.app.constName,
flags.devMode.constName,
flags.endpointType.constName
])
})
}, 300000)

balanceQueryShouldSucceed(nodeCmd.accountManager, nodeCmd, namespace)

Expand Down

0 comments on commit 7680dbe

Please sign in to comment.