File tree Expand file tree Collapse file tree 3 files changed +7
-16
lines changed Expand file tree Collapse file tree 3 files changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -13,20 +13,10 @@ import * as kubectl from '../helpers/kubectl';
1313
1414let integrationId : string ;
1515
16- async function tearDown ( ) {
16+ tap . tearDown ( async ( ) => {
1717 console . log ( 'Begin removing the snyk-monitor...' ) ;
1818 await setup . removeMonitor ( ) ;
1919 console . log ( 'Removed the snyk-monitor!' ) ;
20- }
21-
22- tap . tearDown ( tearDown ) ;
23-
24- tap . test ( 'start with clean environment' , async ( ) => {
25- try {
26- await tearDown ( ) ;
27- } catch ( error ) {
28- console . log ( `could not start with a clean environment: ${ error . message } ` ) ;
29- }
3020} ) ;
3121
3222// Make sure this runs first -- deploying the monitor for the next tests
Original file line number Diff line number Diff line change @@ -19,13 +19,11 @@ if (!packageManager) {
1919 throw new Error ( 'Missing PACKAGE_MANAGER environment variable' ) ;
2020}
2121
22- async function tearDown ( ) {
22+ tap . tearDown ( async ( ) => {
2323 console . log ( 'Begin removing the snyk-monitor...' ) ;
2424 await removeMonitor ( ) ;
2525 console . log ( 'Removed the snyk-monitor!' ) ;
26- }
27-
28- tap . tearDown ( tearDown ) ;
26+ } ) ;
2927
3028// Make sure this runs first -- deploying the monitor for the next tests
3129tap . test ( 'deploy snyk-monitor' , async ( t ) => {
Original file line number Diff line number Diff line change @@ -135,9 +135,12 @@ export async function deployMonitor(): Promise<string> {
135135 await kubectl . downloadKubectl ( ) ;
136136 if ( createCluster ) {
137137 await platforms [ testPlatform ] . create ( ) ;
138+ await platforms [ testPlatform ] . config ( ) ;
139+ } else {
140+ await platforms [ testPlatform ] . config ( ) ;
141+ await platforms [ testPlatform ] . clean ( ) ;
138142 }
139143 const remoteImageName = await platforms [ testPlatform ] . loadImage ( imageNameAndTag ) ;
140- await platforms [ testPlatform ] . config ( ) ;
141144 await createEnvironment ( ) ;
142145 await createSecretForGcrIoAccess ( ) ;
143146
You can’t perform that action at this time.
0 commit comments