Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Remove flaky test

Jakub Novakf81298d9cd04
diff --git a/packages/cli/src/commands/template/build.ts b/packages/cli/src/commands/template/build.ts
index ace01da08..a479e5523 100644
--- a/packages/cli/src/commands/template/build.ts
+++ b/packages/cli/src/commands/template/build.ts
@@ -23,7 +23,6 @@ import { pathOption } from 'src/options'
import { defaultDockerfileName, fallbackDockerfileName } from 'src/docker/constants'
import { configName, getConfigPath, loadConfig, saveConfig } from 'src/config'
import * as child_process from 'child_process'
-import { SANDBOX_DOMAIN} from 'e2b'
const templateCheckInterval = 500 // 0.5 sec
@@ -214,15 +213,15 @@ export const buildCommand = new commander.Command('build')
)
- child_process.execSync(`echo ${accessToken} | docker login docker.${SANDBOX_DOMAIN} -u _e2b_access_token --password-stdin`, { stdio: 'inherit', cwd: root})
+ child_process.execSync(`echo ${accessToken} | docker login docker.${e2b.SANDBOX_DOMAIN} -u _e2b_access_token --password-stdin`, { stdio: 'inherit', cwd: root})
process.stdout.write('\n')
console.log('Building docker image...')
- child_process.execSync(`DOCKER_CLI_HINTS=false docker build . -f ${dockerfileRelativePath} --platform linux/amd64 -t docker.${SANDBOX_DOMAIN}/e2b/custom-envs/${templateID}:${template.buildID}`, { stdio: 'inherit', cwd: root})
+ child_process.execSync(`DOCKER_CLI_HINTS=false docker build . -f ${dockerfileRelativePath} --platform linux/amd64 -t docker.${e2b.SANDBOX_DOMAIN}/e2b/custom-envs/${templateID}:${template.buildID}`, { stdio: 'inherit', cwd: root})
process.stdout.write('\n')
console.log('Pushing docker image...')
- child_process.execSync(`docker push docker.${SANDBOX_DOMAIN}/e2b/custom-envs/${templateID}:${template.buildID}`, { stdio: 'inherit', cwd: root })
+ child_process.execSync(`docker push docker.${e2b.SANDBOX_DOMAIN}/e2b/custom-envs/${templateID}:${template.buildID}`, { stdio: 'inherit', cwd: root })
process.stdout.write('\n')
diff --git a/packages/js-sdk/test/templates/dataAnalysis.test.mjs b/packages/js-sdk/test/templates/dataAnalysis.test.mjs
deleted file mode 100644
index 6ccd5a735..000000000
--- a/packages/js-sdk/test/templates/dataAnalysis.test.mjs
+++ /dev/null
@@ -1,34 +0,0 @@
-import { DataAnalysis } from '../../src'
-import { expect, test } from 'vitest'
-
-test('test_data_analysis', async () => {
- const sandbox = await DataAnalysis.create()
- const result = await sandbox.runPython(
- `
-import matplotlib.pyplot as plt
-
-plt.plot([1, 2, 3, 4])
-plt.ylabel('some numbers')
-plt.show()
- `
- )
- await sandbox.close()
- expect(result.artifacts.length).toEqual(1)
-}, 17000)
-
-
-test('test_install_packages', async () => {
- const sandbox = await DataAnalysis.create()
-
- await sandbox.installPythonPackages("pandas")
- await sandbox.installPythonPackages(["pandas"])
- await sandbox.installPythonPackages(" ")
- await sandbox.installPythonPackages([])
-
- await sandbox.installSystemPackages("curl")
- await sandbox.installSystemPackages(["curl"])
- await sandbox.installSystemPackages("")
- await sandbox.installSystemPackages([])
-
- await sandbox.close()
-})