@@ -21,14 +21,13 @@ import os from 'os'
21
21
import path from 'path'
22
22
import { v4 as uuid4 } from 'uuid'
23
23
import { 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'
25
25
import { K8 } from '../../../src/core/k8.mjs'
26
26
27
27
describe ( 'K8' , ( ) => {
28
28
const testLogger = logging . NewLogger ( 'debug' )
29
29
const configManager = new ConfigManager ( testLogger )
30
30
const k8 = new K8 ( configManager , testLogger )
31
- const downloader = new PackageDownloader ( testLogger )
32
31
33
32
beforeAll ( ( ) => {
34
33
configManager . load ( )
@@ -77,20 +76,13 @@ describe('K8', () => {
77
76
const podName = Templates . renderNetworkPodName ( 'node0' )
78
77
const containerName = constants . ROOT_CONTAINER
79
78
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
-
88
79
const tmpDir = fs . mkdtempSync ( path . join ( os . tmpdir ( ) , 'k8-' ) )
89
80
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`
91
83
92
84
// 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 ( )
94
86
95
87
// download the same file
96
88
await expect ( k8 . copyFrom ( podName , containerName , destPath , tmpDir ) ) . resolves . toBeTruthy ( )
@@ -99,7 +91,7 @@ describe('K8', () => {
99
91
await expect ( k8 . execContainer ( podName , containerName , [ 'rm' , '-f' , destPath ] ) ) . resolves
100
92
101
93
fs . rmdirSync ( tmpDir , { recursive : true } )
102
- } , 300000 )
94
+ } , 20000 )
103
95
104
96
it ( 'should be able to port forward gossip port' , ( done ) => {
105
97
const podName = Templates . renderNetworkPodName ( 'node0' )
0 commit comments