Skip to content

Commit 7b3f0cc

Browse files
committed
Enhancements
1 parent c095a01 commit 7b3f0cc

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@ 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], { timeout: 5000 }).run()
35+
const result = await new ChildProcess('bash', [scriptPath, hostname]).run({
36+
spawnOptions: { timeout: 5000 },
37+
})
3638

3739
const output = result.stderr + result.stdout
38-
assert.ok(!output.includes('Invalid hostname format'))
40+
assert.ok(!output.includes('Invalid hostname npmformat'))
3941
})
4042

4143
it('rejects invalid hostname format', async function () {
@@ -97,11 +99,13 @@ describe('sagemaker_connect script', function () {
9799
it('parses cursor format sm_cursor_<creds-type>_<arn>', async function () {
98100
const hostname = 'sm_cursor_lc_arn_._aws_sagemaker_us-east-1_123456789012_domain__d-abc123'
99101

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

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

0 commit comments

Comments
 (0)