@@ -176,21 +176,21 @@ describe('K8', () => {
176
176
it ( 'should be able to copy a file to and from a container' , async ( ) => {
177
177
const pods = await k8 . waitForPodReady ( [ `app=${ podLabelValue } ` ] , 1 , 20 )
178
178
expect ( pods . length ) . toStrictEqual ( 1 )
179
- const tmpDir = fs . mkdtempSync ( path . join ( os . tmpdir ( ) , 'k8-' ) )
180
- const destDir = '/tmp'
181
- const srcPath = 'test/data/pem/keys/a-private-node0.pem'
182
- const destPath = `${ destDir } /a-private-node0.pem`
179
+ const localTmpDir = fs . mkdtempSync ( path . join ( os . tmpdir ( ) , 'k8-test ' ) )
180
+ const remoteTmpDir = '/tmp'
181
+ const localFilePath = 'test/data/pem/keys/a-private-node0.pem'
182
+ const remoteFilePath = `${ remoteTmpDir } /a-private-node0.pem`
183
183
184
184
// upload the file
185
- await expect ( k8 . copyTo ( podName , containerName , srcPath , destDir ) ) . resolves . toBeTruthy ( )
185
+ await expect ( k8 . copyTo ( podName , containerName , localFilePath , remoteTmpDir ) ) . resolves . toBeTruthy ( )
186
186
187
187
// download the same file
188
- await expect ( k8 . copyFrom ( podName , containerName , destPath , tmpDir ) ) . resolves . toBeTruthy ( )
188
+ await expect ( k8 . copyFrom ( podName , containerName , remoteFilePath , localTmpDir ) ) . resolves . toBeTruthy ( )
189
189
190
190
// rm file inside the container
191
- await expect ( k8 . execContainer ( podName , containerName , [ 'rm' , '-f' , destPath ] ) ) . resolves
191
+ await expect ( k8 . execContainer ( podName , containerName , [ 'rm' , '-f' , remoteFilePath ] ) ) . resolves
192
192
193
- fs . rmdirSync ( tmpDir , { recursive : true } )
193
+ fs . rmdirSync ( localTmpDir , { recursive : true } )
194
194
} , defaultTimeout )
195
195
196
196
it ( 'should be able to port forward gossip port' , ( done ) => {
0 commit comments