Skip to content

Commit c095a01

Browse files
committed
Enhancements
1 parent c047fc8 commit c095a01

2 files changed

Lines changed: 9 additions & 13 deletions

File tree

packages/core/src/test/awsService/sagemaker/model.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ describe('prepareDevEnvConnection with Cursor support', function () {
380380
const utils = require('../../../shared/extensionUtilities')
381381
sandbox.stub(utils, 'isCursor').returns(true)
382382

383-
const connectionType = 'sm_lc'
383+
const connectionType: string = 'sm_lc'
384384
const expectedPrefix = 'sm_cursor_lc'
385385

386386
// Test the hostname prefix logic
@@ -396,7 +396,7 @@ describe('prepareDevEnvConnection with Cursor support', function () {
396396
const utils = require('../../../shared/extensionUtilities')
397397
sandbox.stub(utils, 'isCursor').returns(false)
398398

399-
const connectionType = 'sm_lc'
399+
const connectionType: string = 'sm_lc'
400400
const expectedPrefix = 'sm_lc'
401401

402402
const hostnamePrefix =
@@ -411,7 +411,7 @@ describe('prepareDevEnvConnection with Cursor support', function () {
411411
const utils = require('../../../shared/extensionUtilities')
412412
sandbox.stub(utils, 'isCursor').returns(true)
413413

414-
const connectionType = 'sm_hp'
414+
const connectionType: string = 'sm_hp'
415415
const expectedPrefix = 'sm_hp'
416416

417417
const hostnamePrefix =

packages/core/src/test/awsService/sagemaker/sagemakerConnectScript.test.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ describe('sagemaker_connect script', function () {
3232
it('parses cursor format sm_cursor_<creds-type>_<arn>', async function () {
3333
const hostname = 'sm_cursor_lc_arn_._aws_sagemaker_us-east-1_123456789012_domain__d-abc123'
3434

35-
const result = await new ChildProcess('bash', [scriptPath, hostname]).run({
36-
spawnOptions: { timeout: 5000 },
37-
})
35+
const result = await new ChildProcess('bash', [scriptPath, hostname], { timeout: 5000 }).run()
3836

3937
const output = result.stderr + result.stdout
4038
assert.ok(!output.includes('Invalid hostname format'))
@@ -99,13 +97,11 @@ describe('sagemaker_connect script', function () {
9997
it('parses cursor format sm_cursor_<creds-type>_<arn>', async function () {
10098
const hostname = 'sm_cursor_lc_arn_._aws_sagemaker_us-east-1_123456789012_domain__d-abc123'
10199

102-
const result = await new ChildProcess('powershell.exe', [
103-
'-ExecutionPolicy',
104-
'Bypass',
105-
'-File',
106-
psScriptPath,
107-
hostname,
108-
]).run({ spawnOptions: { timeout: 5000 } })
100+
const result = await new ChildProcess(
101+
'powershell.exe',
102+
['-ExecutionPolicy', 'Bypass', '-File', psScriptPath, hostname],
103+
{ timeout: 5000 }
104+
).run()
109105

110106
const output = result.stderr + result.stdout
111107
assert.ok(!output.includes('Invalid hostname format'))

0 commit comments

Comments
 (0)