1
- import os from 'os' ;
2
1
import path from 'path' ;
3
2
import { KindPostService } from '../../src/kind/post' ;
4
3
5
4
const testEnvVars = {
6
5
INPUT_VERBOSITY : '3' ,
7
6
INPUT_QUIET : 'true' ,
8
- INPUT_CONFIG : 'some-path' ,
9
7
INPUT_NAME : 'some-name' ,
10
8
INPUT_KUBECONFIG : 'some-kubeconfig-path' ,
11
- GITHUB_WORKSPACE : '/home/runner/repo' ,
9
+ GITHUB_JOB : 'kind' ,
10
+ RUNNER_TEMP : '/home/runner/work/_temp/' ,
12
11
} ;
13
12
14
13
describe ( 'checking input parsing' , function ( ) {
@@ -27,13 +26,12 @@ describe('checking input parsing', function () {
27
26
28
27
it ( 'correctly parse input' , ( ) => {
29
28
const service : KindPostService = KindPostService . getInstance ( ) ;
30
- expect ( service . configFile ) . toEqual ( testEnvVars . INPUT_CONFIG ) ;
31
29
expect ( service . kubeConfigFile ) . toEqual ( testEnvVars . INPUT_KUBECONFIG ) ;
32
30
expect ( service . skipClusterDeletion ) . toEqual ( false ) ;
33
31
expect ( service . skipClusterLogsExport ) . toEqual ( false ) ;
34
32
} ) ;
35
33
36
- it ( 'correctly set skipClusterCreation ' , ( ) => {
34
+ it ( 'correctly set skipClusterDeletion ' , ( ) => {
37
35
process . env [ 'INPUT_SKIPCLUSTERDELETION' ] = 'true' ;
38
36
const service : KindPostService = KindPostService . getInstance ( ) ;
39
37
expect ( service . skipClusterDeletion ) . toEqual ( true ) ;
@@ -60,7 +58,9 @@ describe('checking input parsing', function () {
60
58
expect ( args ) . toEqual ( [
61
59
'export' ,
62
60
'logs' ,
63
- path . join ( os . tmpdir ( ) , 'kind/some-name/logs' ) ,
61
+ path . normalize (
62
+ '/home/runner/work/_temp/1c1900ec-8f4f-5069-a966-1d3072cc9723'
63
+ ) ,
64
64
'--verbosity' ,
65
65
testEnvVars . INPUT_VERBOSITY ,
66
66
'--quiet' ,
0 commit comments