Skip to content

Commit 1b54783

Browse files
Merge pull request #235 from codecrafters-io/update-tester-utils
Bump tester utils version to 0.4.13
2 parents e653401 + 69e8699 commit 1b54783

File tree

19 files changed

+293
-292
lines changed

19 files changed

+293
-292
lines changed

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ copy_course_file:
2323
| base64 -d \
2424
> internal/test_helpers/course_definition.yml
2525

26-
record_fixtures:
27-
CODECRAFTERS_RECORD_FIXTURES=true make test
2826

2927
update_tester_utils:
3028
go get -u github.com/codecrafters-io/tester-utils

docker_ci/docker-ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ case "$1" in
1818
record_fixtures)
1919
echo "📝 Recording fixtures using Docker container"
2020
docker_build
21-
docker run --rm -it -v "$(pwd)":/app -w /app redis-tester make record_fixtures
21+
docker run --rm -it -e CODECRAFTERS_RECORD_FIXTURES=true -v "$(pwd)":/app -w /app redis-tester make test
2222
;;
2323
*)
2424
echo "Usage:"

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.24.0
55
toolchain go1.24.2
66

77
require (
8-
github.com/codecrafters-io/tester-utils v0.4.9
8+
github.com/codecrafters-io/tester-utils v0.4.13
99
github.com/dustin/go-humanize v1.0.1
1010
github.com/hdt3213/rdb v1.2.0
1111
github.com/stretchr/testify v1.10.0
@@ -14,6 +14,7 @@ require (
1414
)
1515

1616
require (
17+
github.com/creack/pty v1.1.24 // indirect
1718
github.com/davecgh/go-spew v1.1.1 // indirect
1819
github.com/fatih/color v1.18.0 // indirect
1920
github.com/mattn/go-colorable v0.1.14 // indirect

go.sum

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F
66
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
77
github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
88
github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
9-
github.com/codecrafters-io/tester-utils v0.4.9 h1:4J9ZdYB8A2vktofPK9ZlaaXOXP1dZD9zSv6cwDZ9srU=
10-
github.com/codecrafters-io/tester-utils v0.4.9/go.mod h1:Fyrv4IebzjWtvKfpYf8ooYDoOtjYe2qx8bV7KAJpX+w=
9+
github.com/codecrafters-io/tester-utils v0.4.13 h1:6mX5QxR/yM17eW+TfI17iwtmOwTKQnjyDpWllzNrI8I=
10+
github.com/codecrafters-io/tester-utils v0.4.13/go.mod h1:uhbl+sCQIv2Hg4QUZuKQarVR5cuhDbpVKId8KUF2cX8=
11+
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
12+
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
1113
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1214
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
1315
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

internal/test_helpers/fixtures/auth/auth_always_nopass_flag

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ Debug = true
22

33
[tester::#UV9] Running tests for Stage #UV9 (uv9)
44
[tester::#UV9] $ ./spawn_redis_server.sh
5-
[your_program] Logs from your program will appear here!
6-
[your_program] This server always replies with 'nopass' flag present for ACL GETUSER. See commands.go:handleAclGetUser()
7-
[your_program] Redis server listening on 0.0.0.0:6379
5+
[your_program] Logs from your program will appear here!
6+
[your_program] This server always replies with 'nopass' flag present for ACL GETUSER. See commands.go:handleAclGetUser()
7+
[your_program] Redis server listening on 0.0.0.0:6379
88
[tester::#UV9] [client] $ redis-cli ACL GETUSER default
99
[tester::#UV9] [client] Sent bytes: "*3\r\n$3\r\nACL\r\n$7\r\nGETUSER\r\n$7\r\ndefault\r\n"
1010
[tester::#UV9] [client] Received bytes: "*4\r\n$5\r\nflags\r\n*1\r\n$6\r\nnopass\r\n$9\r\npasswords\r\n*0\r\n"

internal/test_helpers/fixtures/auth/auth_mistake_literal_password

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ Debug = true
22

33
[tester::#PL7] Running tests for Stage #PL7 (pl7)
44
[tester::#PL7] $ ./spawn_redis_server.sh
5-
[your_program] Logs from your program will appear here!
6-
[your_program] This server always replies "password" instead of "passwords" for ACL GETUSER. See command.go:handleAclGetUser()
7-
[your_program] Redis server listening on 0.0.0.0:6379
5+
[your_program] Logs from your program will appear here!
6+
[your_program] This server always replies "password" instead of "passwords" for ACL GETUSER. See command.go:handleAclGetUser()
7+
[your_program] Redis server listening on 0.0.0.0:6379
88
[tester::#PL7] [client] $ redis-cli ACL GETUSER default
99
[tester::#PL7] [client] Sent bytes: "*3\r\n$3\r\nACL\r\n$7\r\nGETUSER\r\n$7\r\ndefault\r\n"
1010
[tester::#PL7] [client] Received bytes: "*4\r\n$5\r\nflags\r\n*1\r\n$6\r\nnopass\r\n$8\r\npassword\r\n*0\r\n"

internal/test_helpers/fixtures/auth/auth_mistake_sha256

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ Debug = true
22

33
[tester::#UV9] Running tests for Stage #UV9 (uv9)
44
[tester::#UV9] $ ./spawn_redis_server.sh
5-
[your_program] Logs from your program will appear here!
6-
[your_program] This server always replies with an incorrect password hash in ACL GETUSER. See users.go:hashPassword()
7-
[your_program] Redis server listening on 0.0.0.0:6379
5+
[your_program] Logs from your program will appear here!
6+
[your_program] This server always replies with an incorrect password hash in ACL GETUSER. See users.go:hashPassword()
7+
[your_program] Redis server listening on 0.0.0.0:6379
88
[tester::#UV9] [client] $ redis-cli ACL GETUSER default
99
[tester::#UV9] [client] Sent bytes: "*3\r\n$3\r\nACL\r\n$7\r\nGETUSER\r\n$7\r\ndefault\r\n"
1010
[tester::#UV9] [client] Received bytes: "*4\r\n$5\r\nflags\r\n*1\r\n$6\r\nnopass\r\n$9\r\npasswords\r\n*0\r\n"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tester::#JM1] Running tests for Stage #JM1 (jm1)
22
[tester::#JM1] $ ./spawn_redis_server.sh
33
[tester::#JM1] Connecting to port 6379...
4-
[your_program] hey, not going to bind!
4+
[your_program] hey, not going to bind!
55
[tester::#JM1] Failed to connect to port 6379.
66
[tester::#JM1] Test failed

internal/test_helpers/fixtures/bind/success

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Debug = true
33
[tester::#JM1] Running tests for Stage #JM1 (jm1)
44
[tester::#JM1] $ ./spawn_redis_server.sh
55
[tester::#JM1] Connecting to port 6379...
6-
[your_program] hey, binding to 6379
6+
[your_program] hey, binding to 6379
77
[tester::#JM1] Connection successful
88
[tester::#JM1] Test passed.
99
[tester::#JM1] Terminating program

internal/test_helpers/fixtures/bind/timeout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tester::#JM1] Running tests for Stage #JM1 (jm1)
22
[tester::#JM1] $ ./spawn_redis_server.sh
33
[tester::#JM1] Connecting to port 6379...
4-
[your_program] hey, not going to bind!
4+
[your_program] hey, not going to bind!
55
[tester::#JM1] Failed to connect to port 6379, retrying in 1s
66
[tester::#JM1] Failed to connect to port 6379, retrying in 1s
77
[tester::#JM1] Failed to connect to port 6379, retrying in 1s

0 commit comments

Comments
 (0)