Skip to content

Commit 89f9116

Browse files
authored
Merge pull request #2 from mfzzf/main
chore: remove example.py and update PyPI publish workflow secret name
2 parents 0c09caf + 11fdb3f commit 89f9116

11 files changed

Lines changed: 20 additions & 38 deletions

File tree

.github/workflows/publish-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ jobs:
2929
uses: pypa/gh-action-pypi-publish@release/v1
3030
with:
3131
user: __token__
32-
password: ${{ secrets.PYPI_API_TOKEN }}
32+
password: ${{ secrets.PYPI_PASSWORD }}

example.py

Lines changed: 0 additions & 18 deletions
This file was deleted.

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# content of pytest.ini
22
[pytest]
33
markers =
4-
skip_debug: skip test if E2B_DEBUG is set.
4+
skip_debug: skip test if AGENTBOX_DEBUG is set.
55

66
asyncio_mode=auto
77
addopts = "--import-mode=importlib"

tests/async/sandbox_async/test_internet_access.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ async def test_internet_access_enabled(async_sandbox_factory):
1010

1111
# Test internet connectivity by making a curl request to a reliable external site
1212
result = await sbx.commands.run(
13-
"curl -s -o /dev/null -w '%{http_code}' https://e2b.dev"
13+
"curl -s -o /dev/null -w '%{http_code}' https://sandbox.ucloudai.com"
1414
)
1515
assert result.exit_code == 0
1616
assert result.stdout.strip() == "200"
@@ -24,7 +24,7 @@ async def test_internet_access_disabled(async_sandbox_factory):
2424
# Test that internet connectivity is blocked by making a curl request
2525
with pytest.raises(CommandExitException) as exc_info:
2626
await sbx.commands.run(
27-
"curl --connect-timeout 3 --max-time 5 -Is https://e2b.dev"
27+
"curl --connect-timeout 3 --max-time 5 -Is https://sandbox.ucloudai.com"
2828
)
2929
# The command should fail or timeout when internet access is disabled
3030
assert exc_info.value.exit_code != 0
@@ -36,7 +36,7 @@ async def test_internet_access_default(async_sandbox):
3636
# Test internet connectivity by making a curl request to a reliable external site
3737

3838
result = await async_sandbox.commands.run(
39-
"curl -s -o /dev/null -w '%{http_code}' https://e2b.dev"
39+
"curl -s -o /dev/null -w '%{http_code}' https://sandbox.ucloudai.com"
4040
)
4141
assert result.exit_code == 0
4242
assert result.stdout.strip() == "200"

tests/async/template_async/test_background_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ async def test_build_in_background_should_start_build_and_return_info():
1717
.set_start_cmd('echo "Hello"', wait_for_timeout(10_000))
1818
)
1919

20-
alias = f"e2b-test-{uuid.uuid4()}"
20+
alias = f"ucloud-test-{uuid.uuid4()}"
2121

2222
build_info = await AsyncTemplate.build_in_background(
2323
template,

tests/async/template_async/test_stacktrace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ async def _expect_to_throw_and_check_trace(func, expected_method: str):
9292

9393
@pytest.mark.skip_debug()
9494
async def test_traces_on_from_image(async_build):
95-
template = AsyncTemplate().from_image("e2b.dev/this-image-does-not-exist")
95+
template = AsyncTemplate().from_image("sandbox.ucloudai.com/this-image-does-not-exist")
9696
await _expect_to_throw_and_check_trace(
9797
lambda: async_build(template, alias="from_image", skip_cache=True), "from_image"
9898
)

tests/conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def _build(
103103
):
104104
return Template.build(
105105
template,
106-
alias=alias or f"e2b-test-{uuid4()}",
106+
alias=alias or f"ucloud-test-{uuid4()}",
107107
cpu_count=1,
108108
memory_mb=1024,
109109
skip_cache=skip_cache,
@@ -123,7 +123,7 @@ async def _async_build(
123123
):
124124
return await AsyncTemplate.build(
125125
template,
126-
alias=alias or f"e2b-test-{uuid4()}",
126+
alias=alias or f"ucloud-test-{uuid4()}",
127127
cpu_count=1,
128128
memory_mb=1024,
129129
skip_cache=skip_cache,
@@ -135,14 +135,14 @@ async def _async_build(
135135

136136
@pytest.fixture
137137
def debug():
138-
return os.getenv("E2B_DEBUG") is not None
138+
return os.getenv("AGENTBOX_DEBUG") is not None
139139

140140

141141
@pytest.fixture(autouse=True)
142142
def skip_by_debug(request, debug):
143143
if request.node.get_closest_marker("skip_debug"):
144144
if debug:
145-
pytest.skip("skipped because E2B_DEBUG is set")
145+
pytest.skip("skipped because AGENTBOX_DEBUG is set")
146146

147147

148148
class Helpers:

tests/sync/sandbox_sync/test_internet_access.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def test_internet_access_enabled(sandbox_factory):
99
sbx = sandbox_factory(allow_internet_access=True)
1010

1111
# Test internet connectivity by making a curl request to a reliable external site
12-
result = sbx.commands.run("curl -s -o /dev/null -w '%{http_code}' https://e2b.dev")
12+
result = sbx.commands.run("curl -s -o /dev/null -w '%{http_code}' https://sandbox.ucloudai.com")
1313
assert result.exit_code == 0
1414
assert result.stdout.strip() == "200"
1515

@@ -21,7 +21,7 @@ def test_internet_access_disabled(sandbox_factory):
2121

2222
# Test that internet connectivity is blocked by making a curl request
2323
with pytest.raises(CommandExitException) as exc_info:
24-
sbx.commands.run("curl --connect-timeout 3 --max-time 5 -Is https://e2b.dev")
24+
sbx.commands.run("curl --connect-timeout 3 --max-time 5 -Is https://sandbox.ucloudai.com")
2525
# The command should fail or timeout when internet access is disabled
2626
assert exc_info.value.exit_code != 0
2727

@@ -32,7 +32,7 @@ def test_internet_access_default(sandbox):
3232

3333
# Test internet connectivity by making a curl request to a reliable external site
3434
result = sandbox.commands.run(
35-
"curl -s -o /dev/null -w '%{http_code}' https://e2b.dev"
35+
"curl -s -o /dev/null -w '%{http_code}' https://sandbox.ucloudai.com"
3636
)
3737
assert result.exit_code == 0
3838
assert result.stdout.strip() == "200"

tests/sync/template_sync/test_background_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_build_in_background_should_start_build_and_return_info():
1717
.set_start_cmd('echo "Hello"', wait_for_timeout(10_000))
1818
)
1919

20-
alias = f"e2b-test-{uuid.uuid4()}"
20+
alias = f"ucloud-test-{uuid.uuid4()}"
2121

2222
build_info = Template.build_in_background(
2323
template,

tests/sync/template_sync/test_stacktrace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def _expect_to_throw_and_check_trace(func, expected_method: str):
9393
@pytest.mark.skip_debug()
9494
def test_traces_on_from_image(build):
9595
template = Template()
96-
template = template.from_image("e2b.dev/this-image-does-not-exist")
96+
template = template.from_image("sandbox.ucloudai.com/this-image-does-not-exist")
9797
_expect_to_throw_and_check_trace(
9898
lambda: build(template, alias="from_image", skip_cache=True), "from_image"
9999
)

0 commit comments

Comments
 (0)