Skip to content

Commit 23b1053

Browse files
authored
[tests] relocated test files from examples/testdata to internal/boxcli (#540)
## Summary - Moved test files for devbox commands to follow the convention of `sample.go` and `sample_test.go` being in the same directory. - Made small improvements to the framework: - Added `SetEnv()` - Added `CreateFile()` - Updated `SetDevboxjson` - Added `Close()` - Updated framework so that it runs the tests in a `test_tmp_*` directory and cleans it up after tests are done. ## How was it tested? Run tests in any test file in `intenal/boxcli`. Note: shell_test.go already was there so I appended my tests to the file instead of creating a new file.
1 parent 548eb08 commit 23b1053

File tree

22 files changed

+312
-308
lines changed

22 files changed

+312
-308
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ __pycache__/
3232
*.devcontainer
3333

3434
# test specific files
35-
examples/testdata/commands/generate/Dockerfile
35+
.test_tmp_*

examples/testdata/commands/add/add_test.go

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

examples/testdata/commands/add/devbox.json

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

examples/testdata/commands/generate/devbox.json

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

examples/testdata/commands/rm/devbox.json

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

examples/testdata/commands/run/devbox.json

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

examples/testdata/commands/run/run_test.go

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

examples/testdata/commands/shell/devbox.json

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

examples/testdata/commands/shell/shell_test.go

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

examples/testdata/testframework/impl/framework.go

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

0 commit comments

Comments
 (0)