Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test sandbox closed port error #597

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

0div
Copy link
Contributor

@0div 0div commented Mar 3, 2025

this PR adds tests in js and python SDKs for closed port errors enhancement #265

Copy link

changeset-bot bot commented Mar 3, 2025

⚠️ No Changeset found

Latest commit: da10a0b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@0div 0div self-assigned this Mar 3, 2025
@0div 0div added sdk Improvements or additions to SDKs Improvement Improvement for current functionality labels Mar 3, 2025
@0div 0div changed the title Test return error indicating that the sandbox port is not open e2b 1329 Test sandbox closed port error Mar 3, 2025
@r33drichards
Copy link
Contributor

r33drichards commented Mar 4, 2025

i got an error running these tests locally

pnpm run test
...

 FAIL   0  tests/sandbox/closed_port.test.ts > closed port
SyntaxError: Unexpected token '<', "<html>
<h"... is not valid JSON
 ❯ tests/sandbox/closed_port.test.ts:40:21
     38|   assert.equal(res.status, 502)
     39|   const resp_text = await res.text()
     40|   const resp = JSON.parse(resp_text)
       |                     ^
     41|   const [cleanedSbxId] = sbx.sandboxId.split('-')
     42| 
...

@0div
Copy link
Contributor Author

0div commented Mar 4, 2025

i got an error running these tests locally

pnpm run test
...

 FAIL   0  tests/sandbox/closed_port.test.ts > closed port
SyntaxError: Unexpected token '<', "<html>
<h"... is not valid JSON
 ❯ tests/sandbox/closed_port.test.ts:40:21
     38|   assert.equal(res.status, 502)
     39|   const resp_text = await res.text()
     40|   const resp = JSON.parse(resp_text)
       |                     ^
     41|   const [cleanedSbxId] = sbx.sandboxId.split('-')
     42| 
...

This happened after deploying what's in #265 ?

@r33drichards
Copy link
Contributor

i got an error running these tests locally

pnpm run test
...

 FAIL   0  tests/sandbox/closed_port.test.ts > closed port
SyntaxError: Unexpected token '<', "<html>
<h"... is not valid JSON
 ❯ tests/sandbox/closed_port.test.ts:40:21
     38|   assert.equal(res.status, 502)
     39|   const resp_text = await res.text()
     40|   const resp = JSON.parse(resp_text)
       |                     ^
     41|   const [cleanedSbxId] = sbx.sandboxId.split('-')
     42| 
...

This happened after deploying what's in #265 ?

I'm actually having issues w/ my cluster in general so its probably that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Improvement for current functionality sdk Improvements or additions to SDKs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants