Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

test: remove apt, bun, npm, pip install tests (#1275)

Mish Ushakovb97fd4dfd071
diff --git a/packages/js-sdk/tests/template/methods/aptInstall.test.ts b/packages/js-sdk/tests/template/methods/aptInstall.test.ts
deleted file mode 100644
index 3e4ad777a..000000000
--- a/packages/js-sdk/tests/template/methods/aptInstall.test.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { Template } from '../../../src'
-import { buildTemplateTest } from '../../setup'
-
-buildTemplateTest('apt install', async ({ buildTemplate }) => {
- const template = Template()
- .fromImage('ubuntu:24.04')
- .skipCache()
- .aptInstall('rolldice')
-
- await buildTemplate(template)
-})
-
-buildTemplateTest(
- 'apt install with no install recommends',
- async ({ buildTemplate }) => {
- const template = Template()
- .fromImage('ubuntu:24.04')
- .skipCache()
- .aptInstall('rolldice', { noInstallRecommends: true })
-
- await buildTemplate(template)
- }
-)
diff --git a/packages/js-sdk/tests/template/methods/bunInstall.test.ts b/packages/js-sdk/tests/template/methods/bunInstall.test.ts
deleted file mode 100644
index 4fe3b3738..000000000
--- a/packages/js-sdk/tests/template/methods/bunInstall.test.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { Template } from '../../../src'
-import { buildTemplateTest } from '../../setup'
-
-buildTemplateTest('bun install', async ({ buildTemplate }) => {
- const template = Template()
- .fromBunImage('1.3')
- .skipCache()
- .bunInstall('left-pad')
-
- await buildTemplate(template)
-})
-
-buildTemplateTest('bun install global', async ({ buildTemplate }) => {
- const template = Template()
- .fromBunImage('1.3')
- .skipCache()
- .bunInstall('left-pad', { g: true })
-
- await buildTemplate(template)
-})
-
-buildTemplateTest('bun install dev', async ({ buildTemplate }) => {
- const template = Template()
- .fromBunImage('1.3')
- .skipCache()
- .bunInstall('left-pad', { dev: true })
-
- await buildTemplate(template)
-})
diff --git a/packages/js-sdk/tests/template/methods/npmInstall.test.ts b/packages/js-sdk/tests/template/methods/npmInstall.test.ts
deleted file mode 100644
index e28ac61b1..000000000
--- a/packages/js-sdk/tests/template/methods/npmInstall.test.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { Template } from '../../../src'
-import { buildTemplateTest } from '../../setup'
-
-buildTemplateTest('npm install', async ({ buildTemplate }) => {
- const template = Template()
- .fromNodeImage('24')
- .skipCache()
- .npmInstall('left-pad')
-
- await buildTemplate(template)
-})
-
-buildTemplateTest('npm install global', async ({ buildTemplate }) => {
- const template = Template()
- .fromNodeImage('24')
- .skipCache()
- .npmInstall('left-pad', { g: true })
-
- await buildTemplate(template)
-})
-
-buildTemplateTest('npm install dev', async ({ buildTemplate }) => {
- const template = Template()
- .fromNodeImage('24')
- .skipCache()
- .npmInstall('left-pad', { dev: true })
-
- await buildTemplate(template)
-})
diff --git a/packages/js-sdk/tests/template/methods/pipInstall.test.ts b/packages/js-sdk/tests/template/methods/pipInstall.test.ts
deleted file mode 100644
index 0fa6ad042..000000000
--- a/packages/js-sdk/tests/template/methods/pipInstall.test.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { Template } from '../../../src'
-import { buildTemplateTest } from '../../setup'
-
-buildTemplateTest('pip install', async ({ buildTemplate }) => {
- const template = Template()
- .fromPythonImage('3.13.7-trixie')
- .skipCache()
- .pipInstall('pip-install-test')
-
- await buildTemplate(template)
-})
-
-buildTemplateTest('pip install (user)', async ({ buildTemplate }) => {
- const template = Template()
- .fromPythonImage('3.13.7-trixie')
- .skipCache()
- .pipInstall('pip-install-test', { g: false })
-
- await buildTemplate(template)
-})
diff --git a/packages/python-sdk/tests/async/template_async/methods/test_apt_install.py b/packages/python-sdk/tests/async/template_async/methods/test_apt_install.py
deleted file mode 100644
index 5ed639207..000000000
--- a/packages/python-sdk/tests/async/template_async/methods/test_apt_install.py
+++ /dev/null
@@ -1,23 +0,0 @@
-import pytest
-
-from e2b import AsyncTemplate
-
-
-async def test_apt_install(async_build):
- template = (
- AsyncTemplate().from_image("ubuntu:24.04").skip_cache().apt_install("rolldice")
- )
-
- await async_build(template)
-
-
-async def test_apt_install_no_install_recommends(async_build):
- template = (
- AsyncTemplate()
- .from_image("ubuntu:24.04")
- .skip_cache()
- .apt_install("rolldice", no_install_recommends=True)
- )
- await async_build(template)
diff --git a/packages/python-sdk/tests/async/template_async/methods/test_bun_install.py b/packages/python-sdk/tests/async/template_async/methods/test_bun_install.py
deleted file mode 100644
index 7dafa79e4..000000000
--- a/packages/python-sdk/tests/async/template_async/methods/test_bun_install.py
+++ /dev/null
@@ -1,36 +0,0 @@
-import pytest
-
-from e2b import AsyncTemplate
-
-
-async def test_bun_install(async_build):
- template = (
- AsyncTemplate().from_bun_image("1.3").skip_cache().bun_install("left-pad")
- )
-
- await async_build(template)
-
-
-async def test_bun_install_global(async_build):
- template = (
- AsyncTemplate()
- .from_bun_image("1.3")
- .skip_cache()
- .bun_install("left-pad", g=True)
- )
-
- await async_build(template)
-
-
-async def test_bun_install_dev(async_build):
- template = (
- AsyncTemplate()
- .from_bun_image("1.3")
- .skip_cache()
- .bun_install("left-pad", dev=True)
- )
-
- await async_build(template)
diff --git a/packages/python-sdk/tests/async/template_async/methods/test_npm_install.py b/packages/python-sdk/tests/async/template_async/methods/test_npm_install.py
deleted file mode 100644
index c61cc7f58..000000000
--- a/packages/python-sdk/tests/async/template_async/methods/test_npm_install.py
+++ /dev/null
@@ -1,36 +0,0 @@
-import pytest
-
-from e2b import AsyncTemplate
-
-
-async def test_npm_install(async_build):
- template = (
- AsyncTemplate().from_node_image("24").skip_cache().npm_install("left-pad")
- )
-
- await async_build(template)
-
-
-async def test_npm_install_global(async_build):
- template = (
- AsyncTemplate()
- .from_node_image("24")
- .skip_cache()
- .npm_install("left-pad", g=True)
- )
-
- await async_build(template)
-
-
-async def test_npm_install_dev(async_build):
- template = (
- AsyncTemplate()
- .from_node_image("24")
- .skip_cache()
- .npm_install("left-pad", dev=True)
- )
-
- await async_build(template)
diff --git a/packages/python-sdk/tests/async/template_async/methods/test_pip_install.py b/packages/python-sdk/tests/async/template_async/methods/test_pip_install.py
deleted file mode 100644
index d53acf63b..000000000
--- a/packages/python-sdk/tests/async/template_async/methods/test_pip_install.py
+++ /dev/null
@@ -1,27 +0,0 @@
-import pytest
-
-from e2b import AsyncTemplate
-
-
-async def test_pip_install(async_build):
- template = (
- AsyncTemplate()
- .from_python_image("3.13.7-trixie")
- .skip_cache()
- .pip_install("pip-install-test")
- )
-
- await async_build(template)
-
-
-async def test_pip_install_user(async_build):
- template = (
- AsyncTemplate()
- .from_python_image("3.13.7-trixie")
- .skip_cache()
- .pip_install("pip-install-test", g=False)
- )
-
- await async_build(template)
diff --git a/packages/python-sdk/tests/sync/template_sync/methods/test_apt_install.py b/packages/python-sdk/tests/sync/template_sync/methods/test_apt_install.py
deleted file mode 100644
index a82b93c83..000000000
--- a/packages/python-sdk/tests/sync/template_sync/methods/test_apt_install.py
+++ /dev/null
@@ -1,24 +0,0 @@
-import pytest
-
-from e2b import Template
-
-
-def test_apt_install(build):
- template = (
- Template().from_image("ubuntu:24.04").skip_cache().apt_install("rolldice")
- )
-
- build(template)
-
-
-def test_apt_install_no_install_recommends(build):
- template = (
- Template()
- .from_image("ubuntu:24.04")
- .skip_cache()
- .apt_install("rolldice", no_install_recommends=True)
- )
-
- build(template)
diff --git a/packages/python-sdk/tests/sync/template_sync/methods/test_bun_install.py b/packages/python-sdk/tests/sync/template_sync/methods/test_bun_install.py
deleted file mode 100644
index 398477aa6..000000000
--- a/packages/python-sdk/tests/sync/template_sync/methods/test_bun_install.py
+++ /dev/null
@@ -1,28 +0,0 @@
-import pytest
-
-from e2b import Template
-
-
-def test_bun_install(build):
- template = Template().from_bun_image("1.3").skip_cache().bun_install("left-pad")
-
- build(template)
-
-
-def test_bun_install_global(build):
- template = (
- Template().from_bun_image("1.3").skip_cache().bun_install("left-pad", g=True)
- )
-
- build(template)
-
-
-def test_bun_install_dev(build):
- template = (
- Template().from_bun_image("1.3").skip_cache().bun_install("left-pad", dev=True)
- )
-
- build(template)
diff --git a/packages/python-sdk/tests/sync/template_sync/methods/test_npm_install.py b/packages/python-sdk/tests/sync/template_sync/methods/test_npm_install.py
deleted file mode 100644
index ab6c7d0fa..000000000
--- a/packages/python-sdk/tests/sync/template_sync/methods/test_npm_install.py
+++ /dev/null
@@ -1,28 +0,0 @@
-import pytest
-
-from e2b import Template
-
-
-def test_npm_install(build):
- template = Template().from_node_image("24").skip_cache().npm_install("left-pad")
-
- build(template)
-
-
-def test_npm_install_global(build):
- template = (
- Template().from_node_image("24").skip_cache().npm_install("left-pad", g=True)
- )
-
- build(template)
-
-
-def test_npm_install_dev(build):
- template = (
- Template().from_node_image("24").skip_cache().npm_install("left-pad", dev=True)
- )
-
- build(template)
diff --git a/packages/python-sdk/tests/sync/template_sync/methods/test_pip_install.py b/packages/python-sdk/tests/sync/template_sync/methods/test_pip_install.py
deleted file mode 100644
index 5d7719dca..000000000
--- a/packages/python-sdk/tests/sync/template_sync/methods/test_pip_install.py
+++ /dev/null
@@ -1,27 +0,0 @@
-import pytest
-
-from e2b import Template
-
-
-def test_pip_install(build):
- template = (
- Template()
- .from_python_image("3.13.7-trixie")
- .skip_cache()
- .pip_install("pip-install-test")
- )
-
- build(template)
-
-
-def test_pip_install_user(build):
- template = (
- Template()
- .from_python_image("3.13.7-trixie")
- .skip_cache()
- .pip_install("pip-install-test", g=False)
- )
-
- build(template)