66import assert from 'assert'
77import * as sinon from 'sinon'
88import { Ec2Connecter , getRemoveLinesCommand } from '../../../awsService/ec2/model'
9- import { SSMWrapper } from '../../../shared/clients/ssm'
9+ import { SsmClient } from '../../../shared/clients/ssm'
1010import { Ec2Client } from '../../../shared/clients/ec2Client'
1111import { Ec2Selection } from '../../../awsService/ec2/prompter'
1212import { ToolkitError } from '../../../shared/errors'
@@ -115,7 +115,7 @@ describe('Ec2ConnectClient', function () {
115115 sinon . stub ( Ec2Connecter . prototype , 'isInstanceRunning' ) . resolves ( true )
116116 sinon . stub ( Ec2Connecter . prototype , 'getAttachedIamRole' ) . resolves ( { Arn : 'testRole' } as IAM . Role )
117117 sinon . stub ( Ec2Connecter . prototype , 'hasProperPermissions' ) . resolves ( true )
118- sinon . stub ( SSMWrapper . prototype , 'getInstanceAgentPingStatus' ) . resolves ( 'offline' )
118+ sinon . stub ( SsmClient . prototype , 'getInstanceAgentPingStatus' ) . resolves ( 'offline' )
119119
120120 try {
121121 await client . checkForStartSessionError ( instanceSelection )
@@ -129,15 +129,15 @@ describe('Ec2ConnectClient', function () {
129129 sinon . stub ( Ec2Connecter . prototype , 'isInstanceRunning' ) . resolves ( true )
130130 sinon . stub ( Ec2Connecter . prototype , 'getAttachedIamRole' ) . resolves ( { Arn : 'testRole' } as IAM . Role )
131131 sinon . stub ( Ec2Connecter . prototype , 'hasProperPermissions' ) . resolves ( true )
132- sinon . stub ( SSMWrapper . prototype , 'getInstanceAgentPingStatus' ) . resolves ( 'Online' )
132+ sinon . stub ( SsmClient . prototype , 'getInstanceAgentPingStatus' ) . resolves ( 'Online' )
133133
134134 assert . doesNotThrow ( async ( ) => await client . checkForStartSessionError ( instanceSelection ) )
135135 } )
136136 } )
137137
138138 describe ( 'sendSshKeysToInstance' , async function ( ) {
139139 it ( 'calls the sdk with the proper parameters' , async function ( ) {
140- const sendCommandStub = sinon . stub ( SSMWrapper . prototype , 'sendCommandAndWait' )
140+ const sendCommandStub = sinon . stub ( SsmClient . prototype , 'sendCommandAndWait' )
141141
142142 const testSelection = {
143143 instanceId : 'test-id' ,
@@ -151,7 +151,7 @@ describe('Ec2ConnectClient', function () {
151151 } )
152152
153153 it ( 'avoids writing the keys to any telemetry metrics' , async function ( ) {
154- sinon . stub ( SSMWrapper . prototype , 'sendCommandAndWait' )
154+ sinon . stub ( SsmClient . prototype , 'sendCommandAndWait' )
155155
156156 const testSelection = {
157157 instanceId : 'test-id' ,
@@ -173,7 +173,7 @@ describe('Ec2ConnectClient', function () {
173173 let getTargetPlatformNameStub : sinon . SinonStub < [ target : string ] , Promise < string > >
174174
175175 before ( async function ( ) {
176- getTargetPlatformNameStub = sinon . stub ( SSMWrapper . prototype , 'getTargetPlatformName' )
176+ getTargetPlatformNameStub = sinon . stub ( SsmClient . prototype , 'getTargetPlatformName' )
177177 } )
178178
179179 after ( async function ( ) {
@@ -205,7 +205,7 @@ describe('Ec2ConnectClient', function () {
205205
206206 describe ( 'tryCleanKeys' , async function ( ) {
207207 it ( 'calls the sdk with the proper parameters' , async function ( ) {
208- const sendCommandStub = sinon . stub ( SSMWrapper . prototype , 'sendCommandAndWait' )
208+ const sendCommandStub = sinon . stub ( SsmClient . prototype , 'sendCommandAndWait' )
209209
210210 const testSelection = {
211211 instanceId : 'test-id' ,
@@ -222,7 +222,7 @@ describe('Ec2ConnectClient', function () {
222222
223223 it ( 'logs warning when sdk call fails' , async function ( ) {
224224 const sendCommandStub = sinon
225- . stub ( SSMWrapper . prototype , 'sendCommandAndWait' )
225+ . stub ( SsmClient . prototype , 'sendCommandAndWait' )
226226 . throws ( new ToolkitError ( 'error' ) )
227227
228228 const testSelection = {
0 commit comments