Skip to content

Commit

Permalink
Moved redis server integration tests under specific path
Browse files Browse the repository at this point in the history
  • Loading branch information
Valkyrie00 committed Aug 20, 2022
1 parent d5e237a commit 5a666fb
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 3 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
start_server {tags {"example"}} {
test {SET and GET example item} {
r set x example
r get x
} {example}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ set ::server_pid 0;
set ::socket_host 127.0.0.1
set ::socket_port 21111

set ::server_path "../../cmake-build-debug/src/cachegrand-server"
set ::server_cfg "../../etc/cachegrand.yaml.skel"
set ::server_path "../../../cmake-build-debug/src/cachegrand-server"
set ::server_cfg "../../../etc/cachegrand.yaml.skel"

########################
# Client
Expand All @@ -49,7 +49,7 @@ set ::portcount 8000
########################
# Tests
########################
set ::test_path "./tests"
set ::test_path "./examples"
set ::num_tests 0
set ::num_passed 0
set ::num_failed 0
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ proc kill_server config {
[dict get $config "client"] close
}

if {![dict exists $config "pid"]} {
return
}

if {![is_alive $config]} {
return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ proc execute_test_file __testname {
set path "$::test_path/$__testname.tcl"
set ::curfile $path

if {![file exists $path]} {
set path_not_exists "File test not found in this path: $path"
send_data_packet $::test_server_fd exception $path_not_exists
}

linespacer "#"
puts "** Executing test file: $::curfile"
source $path
Expand Down

0 comments on commit 5a666fb

Please sign in to comment.