Skip to content

Commit 6b9eb69

Browse files
committed
move telemetry into a single test
1 parent 1bfde6b commit 6b9eb69

File tree

2 files changed

+3
-28
lines changed

2 files changed

+3
-28
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/src/test/awsService/ec2/activation.test.ts

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -31,43 +31,18 @@ describe('ec2 activation', function () {
3131
after(function () {
3232
sinon.restore()
3333
})
34-
it('terminal open', async function () {
34+
35+
it('telemetry', async function () {
3536
const terminalStub = sinon.stub(Ec2Connecter.prototype, 'attemptToOpenEc2Terminal')
3637
await vscode.commands.executeCommand('aws.ec2.openTerminal', testNode)
3738

3839
assertTelemetry('ec2_connectToInstance', { ec2ConnectionType: 'ssm' })
3940
terminalStub.restore()
40-
})
41-
42-
it('remote window open', async function () {
43-
const remoteWindowStub = sinon.stub(Ec2Connecter.prototype, 'tryOpenRemoteConnection')
44-
await vscode.commands.executeCommand('aws.ec2.openRemoteConnection', testNode)
4541

46-
assertTelemetry('ec2_connectToInstance', { ec2ConnectionType: 'remoteWorkspace' })
47-
remoteWindowStub.restore()
48-
})
49-
50-
it('state stop', async function () {
5142
const stopInstanceStub = sinon.stub(Ec2Client.prototype, 'stopInstanceWithCancel')
5243
await vscode.commands.executeCommand('aws.ec2.stopInstance', testNode)
5344

5445
assertTelemetry('ec2_changeState', { ec2InstanceState: 'stop' })
5546
stopInstanceStub.restore()
5647
})
57-
58-
it('state start', async function () {
59-
const startInstanceStub = sinon.stub(Ec2Client.prototype, 'startInstance')
60-
await vscode.commands.executeCommand('aws.ec2.startInstance', testNode)
61-
62-
assertTelemetry('ec2_changeState', { ec2InstanceState: 'start' })
63-
startInstanceStub.restore()
64-
})
65-
66-
it('state reboot', async function () {
67-
const rebootInstanceStub = sinon.stub(Ec2Client.prototype, 'rebootInstance')
68-
await vscode.commands.executeCommand('aws.ec2.rebootInstance', testNode)
69-
70-
assertTelemetry('ec2_changeState', { ec2InstanceState: 'reboot' })
71-
rebootInstanceStub.restore()
72-
})
7348
})

0 commit comments

Comments
 (0)