-
Notifications
You must be signed in to change notification settings - Fork 488
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into appComposer/raceConditionFix
- Loading branch information
Showing
6 changed files
with
61 additions
and
4 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
...s/amazonq/.changes/next-release/Breaking Change-7a7320b8-e8a2-4d61-8f2d-7da04f1716da.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"type": "Breaking Change", | ||
"description": "Change focus chat keybind to win+alt+i on Windows, cmd+alt+i on macOS, and meta+alt+i on Linux" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/*! | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import * as vscode from 'vscode' | ||
import * as sinon from 'sinon' | ||
import { assertTelemetry } from '../../testUtil' | ||
import { Ec2InstanceNode } from '../../../awsService/ec2/explorer/ec2InstanceNode' | ||
import { Ec2ParentNode } from '../../../awsService/ec2/explorer/ec2ParentNode' | ||
import { Ec2Client } from '../../../shared/clients/ec2Client' | ||
import { Ec2Connecter } from '../../../awsService/ec2/model' | ||
import { PollingSet } from '../../../shared/utilities/pollingSet' | ||
|
||
describe('ec2 activation', function () { | ||
let testNode: Ec2InstanceNode | ||
|
||
before(function () { | ||
const testRegion = 'test-region' | ||
const testPartition = 'test-partition' | ||
// Don't want to be polling here, that is tested in ../ec2ParentNode.test.ts | ||
// disabled here for convenience (avoiding race conditions with timeout) | ||
sinon.stub(PollingSet.prototype, 'start') | ||
const testClient = new Ec2Client(testRegion) | ||
const parentNode = new Ec2ParentNode(testRegion, testPartition, new Ec2Client(testRegion)) | ||
testNode = new Ec2InstanceNode(parentNode, testClient, testRegion, testPartition, { | ||
InstanceId: 'testId', | ||
LastSeenStatus: 'status', | ||
}) | ||
}) | ||
|
||
after(function () { | ||
sinon.restore() | ||
}) | ||
|
||
it('telemetry', async function () { | ||
const terminalStub = sinon.stub(Ec2Connecter.prototype, 'attemptToOpenEc2Terminal') | ||
await vscode.commands.executeCommand('aws.ec2.openTerminal', testNode) | ||
|
||
assertTelemetry('ec2_connectToInstance', { ec2ConnectionType: 'ssm' }) | ||
terminalStub.restore() | ||
|
||
const stopInstanceStub = sinon.stub(Ec2Client.prototype, 'stopInstanceWithCancel') | ||
await vscode.commands.executeCommand('aws.ec2.stopInstance', testNode) | ||
|
||
assertTelemetry('ec2_changeState', { ec2InstanceState: 'stop' }) | ||
stopInstanceStub.restore() | ||
}) | ||
}) |