File tree Expand file tree Collapse file tree 1 file changed +18
-15
lines changed Expand file tree Collapse file tree 1 file changed +18
-15
lines changed Original file line number Diff line number Diff line change @@ -72,22 +72,25 @@ async function tryDescribingResourceToFile(
7272 name : string ,
7373 namespace : string ,
7474) : Promise < void > {
75- return kubectl
76- . describeKubernetesResource ( kind , name , namespace )
77- . then ( ( description ) => {
78- const fileName = `${ kind } -${ name } -${ namespace } ` ;
79- const filePath = process . env . CI
80- ? // The directory is generated by CircleCI config (see .circleci/config.yml).
81- `/tmp/logs/test/integration/openshift4/${ fileName } `
82- : `${ tmpdir ( ) } /${ fileName } ` ;
83- writeFileSync ( filePath , description ) ;
84- console . log ( `Description for ${ kind } ${ name } is stored in ${ filePath } ` ) ;
85- } )
86- . catch ( ( ) =>
87- console . log (
88- `Could not describe ${ kind } ${ name } in namespace ${ namespace } ` ,
89- ) ,
75+ try {
76+ const description = await kubectl . describeKubernetesResource (
77+ kind ,
78+ name ,
79+ namespace ,
9080 ) ;
81+ const fileName = `${ kind } -${ name } -${ namespace } ` ;
82+ const filePath = process . env . CI
83+ ? // The directory is generated by CircleCI config (see .circleci/config.yml).
84+ `/tmp/logs/test/integration/openshift4/${ fileName } `
85+ : `${ tmpdir ( ) } /${ fileName } ` ;
86+ writeFileSync ( filePath , description ) ;
87+ console . log ( `Description for ${ kind } ${ name } is stored in ${ filePath } ` ) ;
88+ } catch ( error ) {
89+ console . log (
90+ `Could not describe ${ kind } ${ name } in namespace ${ namespace } ` ,
91+ { error } ,
92+ ) ;
93+ }
9194}
9295
9396export async function clean ( ) : Promise < void > {
You can’t perform that action at this time.
0 commit comments