Skip to content

Commit c16a728

Browse files
committed
Update start URL in test
1 parent 8fff8ed commit c16a728

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

packages/amazonq/test/unit/codewhisperer/service/recommendationHandler.test.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import * as sinon from 'sinon'
99
import {
1010
ReferenceInlineProvider,
1111
session,
12-
AuthUtil,
1312
DefaultCodeWhispererClient,
1413
RecommendationsList,
1514
ConfigurationEntry,
@@ -22,10 +21,11 @@ import {
2221
stub,
2322
createMockTextEditor,
2423
resetCodeWhispererGlobalVariables,
25-
createTestAuthUtil,
2624
} from 'aws-core-vscode/test'
2725
// import * as supplementalContextUtil from 'aws-core-vscode/codewhisperer'
2826

27+
const enterpriseSsoStartUrl = 'https://enterprise.awsapps.com/start'
28+
2929
describe('recommendationHandler', function () {
3030
const config: ConfigurationEntry = {
3131
isShowMethodsEnabled: true,
@@ -40,17 +40,13 @@ describe('recommendationHandler', function () {
4040
describe('getRecommendations', async function () {
4141
const mockClient = stub(DefaultCodeWhispererClient)
4242
const mockEditor = createMockTextEditor()
43-
const testStartUrl = 'testStartUrl'
44-
45-
await createTestAuthUtil()
4643

4744
beforeEach(async function () {
4845
sinon.restore()
4946
await resetCodeWhispererGlobalVariables()
5047
mockClient.listRecommendations.resolves({})
5148
mockClient.generateRecommendations.resolves({})
5249
RecommendationHandler.instance.clearRecommendations()
53-
sinon.stub(AuthUtil.instance.connection!, 'startUrl').value(testStartUrl)
5450
})
5551

5652
afterEach(function () {
@@ -146,7 +142,7 @@ describe('recommendationHandler', function () {
146142
codewhispererLineNumber: 1,
147143
codewhispererCursorOffset: 38,
148144
codewhispererLanguage: 'python',
149-
credentialStartUrl: testStartUrl,
145+
credentialStartUrl: enterpriseSsoStartUrl,
150146
codewhispererSupplementalContextIsUtg: false,
151147
codewhispererSupplementalContextTimeout: false,
152148
codewhispererSupplementalContextLatency: 0,

0 commit comments

Comments
 (0)