@@ -21,14 +21,13 @@ import os from 'os'
2121import path from 'path'
2222import { v4 as uuid4 } from 'uuid'
2323import { FullstackTestingError } from '../../../src/core/errors.mjs'
24- import { ConfigManager , constants , logging , PackageDownloader , Templates } from '../../../src/core/index.mjs'
24+ import { ConfigManager , constants , logging , Templates } from '../../../src/core/index.mjs'
2525import { K8 } from '../../../src/core/k8.mjs'
2626
2727describe ( 'K8' , ( ) => {
2828 const testLogger = logging . NewLogger ( 'debug' )
2929 const configManager = new ConfigManager ( testLogger )
3030 const k8 = new K8 ( configManager , testLogger )
31- const downloader = new PackageDownloader ( testLogger )
3231
3332 beforeAll ( ( ) => {
3433 configManager . load ( )
@@ -77,20 +76,13 @@ describe('K8', () => {
7776 const podName = Templates . renderNetworkPodName ( 'node0' )
7877 const containerName = constants . ROOT_CONTAINER
7978
80- // attempt fetch platform jar as we need to check if a big zip file can be uploaded/downloaded
81- const testCacheDir = 'test/data/tmp'
82- const tag = 'v0.42.5'
83- const releasePrefix = Templates . prepareReleasePrefix ( tag )
84- const pkgPath = `${ testCacheDir } /${ releasePrefix } /build-${ tag } .zip`
85- await expect ( downloader . fetchPlatform ( tag , testCacheDir ) ) . resolves . toBe ( pkgPath )
86- expect ( fs . existsSync ( pkgPath ) ) . toBeTruthy ( )
87-
8879 const tmpDir = fs . mkdtempSync ( path . join ( os . tmpdir ( ) , 'k8-' ) )
8980 const destDir = constants . HEDERA_USER_HOME_DIR
90- const destPath = `${ destDir } /build-${ tag } .zip`
81+ const srcPath = 'test/data/pem/keys/a-private-node0.pem'
82+ const destPath = `${ destDir } /a-private-node0.pem`
9183
9284 // upload the file
93- await expect ( k8 . copyTo ( podName , containerName , pkgPath , destDir ) ) . resolves . toBeTruthy ( )
85+ await expect ( k8 . copyTo ( podName , containerName , srcPath , destDir ) ) . resolves . toBeTruthy ( )
9486
9587 // download the same file
9688 await expect ( k8 . copyFrom ( podName , containerName , destPath , tmpDir ) ) . resolves . toBeTruthy ( )
@@ -99,7 +91,7 @@ describe('K8', () => {
9991 await expect ( k8 . execContainer ( podName , containerName , [ 'rm' , '-f' , destPath ] ) ) . resolves
10092
10193 fs . rmdirSync ( tmpDir , { recursive : true } )
102- } , 300000 )
94+ } , 20000 )
10395
10496 it ( 'should be able to port forward gossip port' , ( done ) => {
10597 const podName = Templates . renderNetworkPodName ( 'node0' )
0 commit comments