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

chores[deps]: tester-utils 0.2.20 upgrade #41

Merged
merged 3 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/codecrafters-io/docker-tester
go 1.13

require (
github.com/codecrafters-io/tester-utils v0.2.18
github.com/codecrafters-io/tester-utils v0.2.20
github.com/fatih/color v1.16.0 // indirect
github.com/stretchr/testify v1.8.4
golang.org/x/sys v0.18.0 // indirect
golang.org/x/sys v0.19.0 // indirect
gopkg.in/yaml.v2 v2.4.0
)
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ github.com/codecrafters-io/tester-utils v0.2.17 h1:rO04TuOME773cZE729kIVOiXpZSq5
github.com/codecrafters-io/tester-utils v0.2.17/go.mod h1:BeSLyqBpFxUwIm41QlnuRG7ZsabBXWE2Ga3LMFUXAPM=
github.com/codecrafters-io/tester-utils v0.2.18 h1:fjIWERlzR1700Mogr8+30H3bYyLY+36KMU8ojloo3/0=
github.com/codecrafters-io/tester-utils v0.2.18/go.mod h1:BeSLyqBpFxUwIm41QlnuRG7ZsabBXWE2Ga3LMFUXAPM=
github.com/codecrafters-io/tester-utils v0.2.20 h1:t/IFFXOrSgRIoq6x4kUnRdjuai7EcwWH42Za25hvneA=
github.com/codecrafters-io/tester-utils v0.2.20/go.mod h1:BeSLyqBpFxUwIm41QlnuRG7ZsabBXWE2Ga3LMFUXAPM=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -44,6 +46,8 @@ golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
Expand Down
12 changes: 6 additions & 6 deletions internal/test_helpers/fixtures/exit_code/success
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
Debug = true

[stage-1] Running tests for Stage #1: init
[stage-1] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo 88398
[your_program] 88398
[stage-1] Checking if the command output was echo-ed..
[stage-1] Test passed.

[stage-2] Running tests for Stage #2: stdio
[stage-2] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo 88398
[your_program] 88398
Expand All @@ -14,3 +8,9 @@ Debug = true
[your_program] 28626
[stage-2] Checking if the string was echo-ed to stderr..
[stage-2] Test passed.

[stage-1] Running tests for Stage #1: init
[stage-1] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo 88398
[your_program] 88398
[stage-1] Checking if the command output was echo-ed..
[stage-1] Test passed.
32 changes: 0 additions & 32 deletions internal/test_helpers/fixtures/fetch_from_registry/failure
Original file line number Diff line number Diff line change
@@ -1,37 +1,5 @@
Debug = true

[stage-1] Running tests for Stage #1: init
[stage-1] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo 88398
[your_program] 88398
[stage-1] Checking if the command output was echo-ed..
[stage-1] Test passed.

[stage-2] Running tests for Stage #2: stdio
[stage-2] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo 88398
[your_program] 88398
[stage-2] Checking if the string was echo-ed to stdout..
[stage-2] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo_stderr 28626
[your_program] 28626
[stage-2] Checking if the string was echo-ed to stderr..
[stage-2] Test passed.

[stage-3] Running tests for Stage #3: exit_code
[stage-3] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer exit 3
[stage-3] Checking the parent process's exit code..
[stage-3] Test passed.

[stage-4] Running tests for Stage #4: fs_isolation
[stage-4] Created temp dir on host: /tmp/88398
[stage-4] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer ls /tmp/88398
[stage-4] (expecting that the directory won't be accessible)
[your_program] No such file or directory
[stage-4] Test passed.

[stage-5] Running tests for Stage #5: process_isolation
[stage-5] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer mypid
[your_program] 1
[stage-5] Test passed.

[stage-6] Running tests for Stage #6: fetch_from_registry
[stage-6] Executing: ./your_docker.sh run alpine /bin/sh -c '/bin/ls /'
[your_program] Expected 'run <image> <command>' as the command! args: ["run" "alpine" "/bin/sh" "-c" "/bin/ls /"]
Expand Down
20 changes: 0 additions & 20 deletions internal/test_helpers/fixtures/fs_isolation/failure
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
Debug = true

[stage-1] Running tests for Stage #1: init
[stage-1] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo 88398
[your_program] 88398
[stage-1] Checking if the command output was echo-ed..
[stage-1] Test passed.

[stage-2] Running tests for Stage #2: stdio
[stage-2] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo 88398
[your_program] 88398
[stage-2] Checking if the string was echo-ed to stdout..
[stage-2] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo_stderr 28626
[your_program] 28626
[stage-2] Checking if the string was echo-ed to stderr..
[stage-2] Test passed.

[stage-3] Running tests for Stage #3: exit_code
[stage-3] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer exit 3
[stage-3] Checking the parent process's exit code..
[stage-3] Test passed.

[stage-4] Running tests for Stage #4: fs_isolation
[stage-4] Created temp dir on host: /tmp/88398
[stage-4] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer ls /tmp/88398
Expand Down
32 changes: 16 additions & 16 deletions internal/test_helpers/fixtures/fs_isolation/success
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
Debug = true

[stage-1] Running tests for Stage #1: init
[stage-1] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo 88398
[your_program] 88398
[stage-1] Checking if the command output was echo-ed..
[stage-1] Test passed.
[stage-4] Running tests for Stage #4: fs_isolation
[stage-4] Created temp dir on host: /tmp/88398
[stage-4] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer ls /tmp/88398
[stage-4] (expecting that the directory won't be accessible)
[your_program] No such file or directory
[stage-4] Test passed.

[stage-3] Running tests for Stage #3: exit_code
[stage-3] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer exit 3
[stage-3] Checking the parent process's exit code..
[stage-3] Test passed.

[stage-2] Running tests for Stage #2: stdio
[stage-2] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo 88398
Expand All @@ -15,14 +21,8 @@ Debug = true
[stage-2] Checking if the string was echo-ed to stderr..
[stage-2] Test passed.

[stage-3] Running tests for Stage #3: exit_code
[stage-3] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer exit 3
[stage-3] Checking the parent process's exit code..
[stage-3] Test passed.

[stage-4] Running tests for Stage #4: fs_isolation
[stage-4] Created temp dir on host: /tmp/88398
[stage-4] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer ls /tmp/88398
[stage-4] (expecting that the directory won't be accessible)
[your_program] No such file or directory
[stage-4] Test passed.
[stage-1] Running tests for Stage #1: init
[stage-1] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo 88398
[your_program] 88398
[stage-1] Checking if the command output was echo-ed..
[stage-1] Test passed.
42 changes: 21 additions & 21 deletions internal/test_helpers/fixtures/process_isolation/success
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
Debug = true

[stage-1] Running tests for Stage #1: init
[stage-1] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo 88398
[your_program] 88398
[stage-1] Checking if the command output was echo-ed..
[stage-1] Test passed.
[stage-5] Running tests for Stage #5: process_isolation
[stage-5] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer mypid
[your_program] 1
[stage-5] Test passed.

[stage-4] Running tests for Stage #4: fs_isolation
[stage-4] Created temp dir on host: /tmp/88398
[stage-4] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer ls /tmp/88398
[stage-4] (expecting that the directory won't be accessible)
[your_program] No such file or directory
[stage-4] Test passed.

[stage-3] Running tests for Stage #3: exit_code
[stage-3] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer exit 3
[stage-3] Checking the parent process's exit code..
[stage-3] Test passed.

[stage-2] Running tests for Stage #2: stdio
[stage-2] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo 88398
Expand All @@ -15,19 +26,8 @@ Debug = true
[stage-2] Checking if the string was echo-ed to stderr..
[stage-2] Test passed.

[stage-3] Running tests for Stage #3: exit_code
[stage-3] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer exit 3
[stage-3] Checking the parent process's exit code..
[stage-3] Test passed.

[stage-4] Running tests for Stage #4: fs_isolation
[stage-4] Created temp dir on host: /tmp/88398
[stage-4] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer ls /tmp/88398
[stage-4] (expecting that the directory won't be accessible)
[your_program] No such file or directory
[stage-4] Test passed.

[stage-5] Running tests for Stage #5: process_isolation
[stage-5] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer mypid
[your_program] 1
[stage-5] Test passed.
[stage-1] Running tests for Stage #1: init
[stage-1] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo 88398
[your_program] 88398
[stage-1] Checking if the command output was echo-ed..
[stage-1] Test passed.
6 changes: 0 additions & 6 deletions internal/test_helpers/fixtures/stdio/failure
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
Debug = true

[stage-1] Running tests for Stage #1: init
[stage-1] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo 88398
[your_program] 88398
[stage-1] Checking if the command output was echo-ed..
[stage-1] Test passed.

[stage-2] Running tests for Stage #2: stdio
[stage-2] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo 88398
[your_program] 88398
Expand Down
12 changes: 6 additions & 6 deletions internal/test_helpers/fixtures/stdio/success
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
Debug = true

[stage-1] Running tests for Stage #1: init
[stage-1] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo 88398
[your_program] 88398
[stage-1] Checking if the command output was echo-ed..
[stage-1] Test passed.

[stage-2] Running tests for Stage #2: stdio
[stage-2] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo 88398
[your_program] 88398
Expand All @@ -14,3 +8,9 @@ Debug = true
[your_program] 28626
[stage-2] Checking if the string was echo-ed to stderr..
[stage-2] Test passed.

[stage-1] Running tests for Stage #1: init
[stage-1] Executing: ./your_docker.sh run <some_image> /usr/local/bin/docker-explorer echo 88398
[your_program] 88398
[stage-1] Checking if the command output was echo-ed..
[stage-1] Test passed.
Loading