-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(chart): use quote for test labels and fix e2e tests (#560)
Signed-off-by: Lenin Mehedy <[email protected]>
- Loading branch information
1 parent
38dd176
commit 27fda90
Showing
3 changed files
with
33 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 4 additions & 9 deletions
13
fullstack-network-manager/test/e2e/core/package_downloader_e2e.test.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,20 @@ | ||
import { describe, expect, it } from '@jest/globals' | ||
import * as fs from 'fs' | ||
import * as path from 'path' | ||
import * as os from 'os' | ||
import { logging, PackageDownloader, Templates } from '../../../src/core/index.mjs' | ||
|
||
describe('PackageDownloaderE2E', () => { | ||
const testLogger = logging.NewLogger('debug') | ||
const downloader = new PackageDownloader(testLogger) | ||
|
||
it('should succeed with a valid Hedera release tag', async () => { | ||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'downloader-')) | ||
const testCacheDir = 'test/data/tmp' | ||
|
||
const tag = 'v0.42.5' | ||
const releasePrefix = Templates.prepareReleasePrefix(tag) | ||
|
||
const destPath = `${tmpDir}/${releasePrefix}/build-${tag}.zip` | ||
await expect(downloader.fetchPlatform(tag, tmpDir)).resolves.toBe(destPath) | ||
const destPath = `${testCacheDir}/${releasePrefix}/build-${tag}.zip` | ||
await expect(downloader.fetchPlatform(tag, testCacheDir)).resolves.toBe(destPath) | ||
expect(fs.existsSync(destPath)).toBeTruthy() | ||
testLogger.showUser(destPath) | ||
|
||
// remove the downloaded files to reduce disk usage | ||
fs.rmSync(`${tmpDir}`, { recursive: true }) | ||
}, 100000) | ||
}, 200000) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters