Skip to content

Commit

Permalink
Add config and more tests
Browse files Browse the repository at this point in the history
Signed-off-by: Shivshankar-Reddy <[email protected]>
  • Loading branch information
Shivshankar-Reddy committed Oct 2, 2024
1 parent 0eb377f commit 48223f7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/unit/admin-port.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ tags {external:skip tls:skip} {
}
}

test {admin-port: setting admin-port to server port should fail} {
start_server {} {
catch {r CONFIG SET port [srv 0 admin-port]} e
assert_match {*Unable to listen on this port*} $e
}
}

test {admin-port: client could connect on admin-port after maxclients reached} {
start_server {} {
set original_maxclients [lindex [r config get maxclients] 1]
Expand Down
9 changes: 9 additions & 0 deletions valkey.conf
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@ protected-mode yes
# If port 0 is specified the server will not listen on a TCP socket.
port 6379

# admin-port
#
# Accept connections on the specified port and connections should be originating from
# local loopback (127.0.0.1), unix domain socket or IPv6 address (::1).
# Default is 0 and immutable.
# If admin-port is not specified the server will not listen on a TCP socket.
#
# admin-port 0

# TCP listen() backlog.
#
# In high requests-per-second environments you need a high backlog in order
Expand Down

0 comments on commit 48223f7

Please sign in to comment.