Skip to content

Commit

Permalink
don't need async and done
Browse files Browse the repository at this point in the history
Signed-off-by: Jeromy Cannon <[email protected]>
  • Loading branch information
jeromy-cannon committed Oct 20, 2024
1 parent ea68382 commit efede45
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 33 deletions.
6 changes: 2 additions & 4 deletions test/e2e/commands/account.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,13 @@ e2eTestSuite(testName, argv, undefined, undefined, undefined, undefined, undefin
const configManager = bootstrapResp.opts.configManager
const nodeCmd = bootstrapResp.cmd.nodeCmd

after(async function (done) {
after(async function () {
this.timeout(3 * MINUTES)

await getNodeLogs(k8, namespace)
await k8.deleteNamespace(namespace)
await accountManager.close()
await nodeCmd.close()
done()
})

describe('node proxies should be UP', () => {
Expand Down Expand Up @@ -93,10 +92,9 @@ e2eTestSuite(testName, argv, undefined, undefined, undefined, undefined, undefin
await accountManager.loadNodeClient(namespace)
})

after(async function (done) {
after(async function () {
this.timeout(20 * SECONDS)
await accountManager.close()
done()
})

for (const [start, end] of testSystemAccounts) {
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/commands/cluster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('ClusterCommand', () => {

const clusterCmd = bootstrapResp.cmd.clusterCmd

after(async function (done) {
after(async function () {
this.timeout(3 * MINUTES)

await k8.deleteNamespace(namespace)
Expand All @@ -70,7 +70,6 @@ describe('ClusterCommand', () => {
do {
await sleep(5 * SECONDS)
} while (!await chartManager.isChartInstalled(constants.SOLO_SETUP_NAMESPACE, constants.SOLO_CLUSTER_SETUP_CHART))
done()
})

beforeEach(() => configManager.reset())
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/commands/mirror_node.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,14 @@ e2eTestSuite(testName, argv, undefined, undefined, undefined, undefined, undefin
bootstrapResp.opts.logger.showUser(`------------------------- START: ${testName} ----------------------------`)
})

after(async function (done) {
after(async function () {
this.timeout(3 * MINUTES)

await getNodeLogs(k8, namespace)
await k8.deleteNamespace(namespace)
await accountManager.close()

bootstrapResp.opts.logger.showUser(`------------------------- END: ${testName} ----------------------------`)
done()
})

// give a few ticks so that connections can close
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/commands/network.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,12 @@ describe('NetworkCommand', () => {
const initCmd = bootstrapResp.cmd.initCmd
const nodeCmd = bootstrapResp.cmd.nodeCmd

after(async function (done) {
after(async function () {
this.timeout(3 * MINUTES)

await getNodeLogs(k8, namespace)
await k8.deleteNamespace(namespace)
await accountManager.close()
done()
})

before(async () => {
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/commands/node_delete.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@ e2eTestSuite(namespace, argv, undefined, undefined, undefined, undefined, undefi
const accountCmd = bootstrapResp.cmd.accountCmd
const k8 = bootstrapResp.opts.k8

after(async function (done) {
after(async function () {
this.timeout(10 * MINUTES)
await getNodeLogs(k8, namespace)
await k8.deleteNamespace(namespace)
done()
})

it('should succeed with init command', async () => {
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/commands/node_update.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,12 @@ e2eTestSuite(namespace, argv, undefined, undefined, undefined, undefined, undefi
let existingServiceMap
let existingNodeIdsPrivateKeysHash

after(async function (done) {
after(async function () {
this.timeout(10 * MINUTES)

await getNodeLogs(k8, namespace)
await nodeCmd.stop(argv)
await k8.deleteNamespace(namespace)
done()
})

it('cache current version of private keys', async () => {
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/commands/node_upgrade.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ e2eTestSuite(namespace, argv, undefined, undefined, undefined, undefined, undefi
const accountCmd = bootstrapResp.cmd.accountCmd
const k8 = bootstrapResp.opts.k8

after(async function (done) {
after(async function () {
this.timeout(10 * MINUTES)

await getNodeLogs(k8, namespace)
await k8.deleteNamespace(namespace)
done()
})

it('should succeed with init command', async () => {
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/commands/separate_node_add.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ e2eTestSuite(namespace, argv, undefined, undefined, undefined, undefined, undefi
let existingServiceMap
let existingNodeIdsPrivateKeysHash

after(async function (done) {
after(async function () {
this.timeout(10 * MINUTES)

await getNodeLogs(k8, namespace)
Expand All @@ -70,7 +70,6 @@ e2eTestSuite(namespace, argv, undefined, undefined, undefined, undefined, undefi
await nodeCmd.stop(argv)
await networkCmd.destroy(argv)
await k8.deleteNamespace(namespace)
done()
})

it('cache current version of private keys', async () => {
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/commands/separate_node_delete.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,11 @@ e2eTestSuite(namespace, argv, undefined, undefined, undefined, undefined, undefi
const accountCmd = bootstrapResp.cmd.accountCmd
const k8 = bootstrapResp.opts.k8

after(async function (done) {
after(async function () {
this.timeout(10 * MINUTES)

await getNodeLogs(k8, namespace)
await k8.deleteNamespace(namespace)
done()
})

it('should succeed with init command', async () => {
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/e2e_node_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,11 @@ export function e2eNodeKeyRefreshTest (testName: string, mode: string, releaseTa
await accountManager.close()
})

after(async function (done) {
after(async function () {
this.timeout(10 * MINUTES)

await getNodeLogs(k8, namespace)
await k8.deleteNamespace(namespace)
done()
})

describe(`Node should have started successfully [mode ${mode}, release ${releaseTag}]`, () => {
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/integration/core/account_manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@ e2eTestSuite(namespace, argv, undefined, undefined, undefined, undefined, undefi
const accountManager = bootstrapResp.opts.accountManager
const configManager = bootstrapResp.opts.configManager

after(async function (done) {
after(async function () {
this.timeout(3 * MINUTES)

await k8.deleteNamespace(namespace)
await accountManager.close()
done()
})

it('should be able to stop port forwards', async () => {
Expand Down
4 changes: 1 addition & 3 deletions test/e2e/integration/core/k8_e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ describe('K8', () => {
}
})

after(async function (done) {
after(async function () {
this.timeout(defaultTimeout)
try {
await k8.kubeClient.deleteNamespacedPod(podName, testNamespace, undefined, undefined, 1)
Expand All @@ -113,8 +113,6 @@ describe('K8', () => {
} catch (e) {
console.log(e)
throw e
} finally {
done()
}
})

Expand Down
3 changes: 1 addition & 2 deletions test/e2e/integration/core/platform_installer_e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,11 @@ e2eTestSuite(namespace, argv, undefined, undefined, undefined, undefined, undefi
const podName = 'network-node1-0'
const packageVersion = 'v0.42.5'

after(async function (done) {
after(async function () {
this.timeout(3 * MINUTES)

await k8.deleteNamespace(namespace)
await accountManager.close()
done()
})

before(function () {
Expand Down
3 changes: 1 addition & 2 deletions test/test_add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,14 @@ export function testNodeAdd (localBuildPath: string, testDescription: string = '
let existingServiceMap: Map<NodeAlias, NetworkNodeServices>
let existingNodeIdsPrivateKeysHash: Map<NodeAlias, Map<string, string>>

after(async function (done) {
after(async function () {
this.timeout(10 * MINUTES)

await getNodeLogs(k8, namespace)
await bootstrapResp.opts.accountManager.close()
await nodeCmd.stop(argv)
await networkCmd.destroy(argv)
await k8.deleteNamespace(namespace)
done()
})

it('cache current version of private keys', async () => {
Expand Down
3 changes: 1 addition & 2 deletions test/test_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,10 @@ export function e2eTestSuite (
bootstrapResp.opts.logger.showUser(`------------------------- START: bootstrap (${testName}) ----------------------------`)
})

after(async function (done) {
after(async function () {
this.timeout(3 * MINUTES)
await getNodeLogs(k8, namespace)
bootstrapResp.opts.logger.showUser(`------------------------- END: bootstrap (${testName}) ----------------------------`)
done()
})

it('should cleanup previous deployment', async () => {
Expand Down

0 comments on commit efede45

Please sign in to comment.