forked from valkey-io/valkey
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementation of adding new port and the capabilities
Signed-off-by: Shivshankar-Reddy <[email protected]>
- Loading branch information
1 parent
ac569c0
commit 0eb377f
Showing
7 changed files
with
82 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
tags {external:skip tls:skip} { | ||
test {admin-port: CONFIG SET port number should fail} { | ||
start_server {} { | ||
set avail_port [find_available_port $::baseport $::portcount] | ||
set rd [valkey [srv 0 host] [srv 0 admin-port]] | ||
assert_error {*can't set immutable config*} {$rd CONFIG SET admin-port $avail_port} | ||
$rd PING | ||
$rd close | ||
} | ||
} | ||
|
||
test {admin-port: connection should fail on non-loopback interface} { | ||
start_server {} { | ||
catch {valkey [get_nonloopback_addr] [srv 0 admin-port]} e | ||
assert_match {*connection refused*} $e | ||
} | ||
} | ||
|
||
test {admin-port: client could connect on admin-port after maxclients reached} { | ||
start_server {} { | ||
set original_maxclients [lindex [r config get maxclients] 1] | ||
r config set maxclients 2 | ||
set rd [valkey [srv 0 host] [srv 0 port]] | ||
assert_match "PONG" [$rd PING] | ||
set rd1 [valkey [srv 0 host] [srv 0 port]] | ||
catch {$rd1 PING} e | ||
assert_match "*ERR max*reached*" $e | ||
set rd2 [valkey [srv 0 host] [srv 0 admin-port]] | ||
assert_match "PONG" [$rd2 PING] | ||
r config set maxclients $original_maxclients | ||
$rd close | ||
$rd1 close | ||
$rd2 close | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters