@@ -7,7 +7,7 @@ import * as sinon from 'sinon'
77import { assertTelemetry } from '../../testUtil'
88import { Ec2InstanceNode } from '../../../awsService/ec2/explorer/ec2InstanceNode'
99import { Ec2ParentNode } from '../../../awsService/ec2/explorer/ec2ParentNode'
10- import { Ec2Client } from '../../../shared/clients/ec2Client '
10+ import { Ec2Wrapper , SafeEc2Instance } from '../../../shared/clients/ec2Wrapper '
1111import { Ec2Connecter } from '../../../awsService/ec2/model'
1212import { PollingSet } from '../../../shared/utilities/pollingSet'
1313
@@ -20,12 +20,12 @@ describe('ec2 activation', function () {
2020 // Don't want to be polling here, that is tested in ../ec2ParentNode.test.ts
2121 // disabled here for convenience (avoiding race conditions with timeout)
2222 sinon . stub ( PollingSet . prototype , 'start' )
23- const testClient = new Ec2Client ( testRegion )
24- const parentNode = new Ec2ParentNode ( testRegion , testPartition , new Ec2Client ( testRegion ) )
23+ const testClient = new Ec2Wrapper ( testRegion )
24+ const parentNode = new Ec2ParentNode ( testRegion , testPartition , new Ec2Wrapper ( testRegion ) )
2525 testNode = new Ec2InstanceNode ( parentNode , testClient , testRegion , testPartition , {
2626 InstanceId : 'testId' ,
2727 LastSeenStatus : 'status' ,
28- } )
28+ } as SafeEc2Instance )
2929 } )
3030
3131 after ( function ( ) {
@@ -39,7 +39,7 @@ describe('ec2 activation', function () {
3939 assertTelemetry ( 'ec2_connectToInstance' , { ec2ConnectionType : 'ssm' } )
4040 terminalStub . restore ( )
4141
42- const stopInstanceStub = sinon . stub ( Ec2Client . prototype , 'stopInstanceWithCancel' )
42+ const stopInstanceStub = sinon . stub ( Ec2Wrapper . prototype , 'stopInstanceWithCancel' )
4343 await vscode . commands . executeCommand ( 'aws.ec2.stopInstance' , testNode )
4444
4545 assertTelemetry ( 'ec2_changeState' , { ec2InstanceState : 'stop' } )
0 commit comments