Commit 3fc057fc authored by Nick Craver's avatar Nick Craver

Tests: heavy config refactor/simplification

Also adds Sentinel to appveyor, we hope. Or this will fail miserably.
parent 5e5ffdca
port 6379 port 6379
dbfilename master.rdb
databases 2000 databases 2000
maxmemory 6gb maxmemory 6gb
dir "../Temp"
appendonly no appendonly no
dbfilename "master-6379.rdb"
save "" save ""
\ No newline at end of file
port 6381 port 6381
requirepass changeme requirepass changeme
dbfilename secure.rdb
databases 2000 databases 2000
maxmemory 512mb maxmemory 512mb
dir "../Temp"
dbfilename "secure-6381.rdb"
save "" save ""
\ No newline at end of file
port 6380 port 6380
slaveof 127.0.0.1 6379 slaveof 127.0.0.1 6379
dbfilename slave.rdb
databases 2000 databases 2000
maxmemory 2gb maxmemory 2gb
appendonly no appendonly no
dir "../Temp"
dbfilename "slave-6380.rdb"
save "" save ""
\ No newline at end of file
port 7000
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
\ No newline at end of file
port 7001
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
\ No newline at end of file
port 7002
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
\ No newline at end of file
port 7003
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
\ No newline at end of file
port 7004
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
\ No newline at end of file
port 7005
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
\ No newline at end of file
port 7000
cluster-enabled yes
dir "../Temp"
cluster-config-file "../Cluster/nodes-7000.conf"
cluster-node-timeout 5000
appendonly yes
dbfilename "dump-7000.rdb"
appendfilename "appendonly-7000.aof"
save ""
\ No newline at end of file
port 7001
cluster-enabled yes
dir "../Temp"
cluster-config-file "../Cluster/nodes-7001.conf"
cluster-node-timeout 5000
appendonly yes
dbfilename "dump-7001.rdb"
appendfilename "appendonly-7001.aof"
save ""
\ No newline at end of file
port 7002
cluster-enabled yes
dir "../Temp"
cluster-config-file "../Cluster/nodes-7002.conf"
cluster-node-timeout 5000
appendonly yes
dbfilename "dump-7002.rdb"
appendfilename "appendonly-7002.aof"
save ""
\ No newline at end of file
port 7003
cluster-enabled yes
dir "../Temp"
cluster-config-file "../Cluster/nodes-7003.conf"
cluster-node-timeout 5000
appendonly yes
dbfilename "dump-7003.rdb"
appendfilename "appendonly-7003.aof"
save ""
\ No newline at end of file
port 7004
cluster-enabled yes
dir "../Temp"
cluster-config-file "../Cluster/nodes-7004.conf"
cluster-node-timeout 5000
appendonly yes
dbfilename "dump-7004.rdb"
appendfilename "appendonly-7004.aof"
save ""
\ No newline at end of file
port 7005
cluster-enabled yes
dir "../Temp"
cluster-config-file "../Cluster/nodes-7005.conf"
cluster-node-timeout 5000
appendonly yes
dbfilename "dump-7005.rdb"
appendfilename "appendonly-7005.aof"
save ""
\ No newline at end of file
port 7010 port 7010
dbfilename 7010.rdb
maxmemory 100mb maxmemory 100mb
appendonly no appendonly no
dir "../Temp"
dbfilename "sentinel-target-7010.rdb"
save "" save ""
\ No newline at end of file
port 7011 port 7011
dbfilename "7011.rdb"
maxmemory 100mb maxmemory 100mb
appendonly no appendonly no
dir "../Temp"
dbfilename "sentinel-target-7011.rdb"
save "" save ""
slaveof 127.0.0.1 7010 slaveof 127.0.0.1 7010
\ No newline at end of file
...@@ -3,4 +3,4 @@ sentinel monitor mymaster 127.0.0.1 7010 1 ...@@ -3,4 +3,4 @@ sentinel monitor mymaster 127.0.0.1 7010 1
sentinel down-after-milliseconds mymaster 1000 sentinel down-after-milliseconds mymaster 1000
sentinel failover-timeout mymaster 2000 sentinel failover-timeout mymaster 2000
sentinel config-epoch mymaster 0 sentinel config-epoch mymaster 0
dir "Temp" dir "../Temp"
\ No newline at end of file \ No newline at end of file
...@@ -3,4 +3,4 @@ sentinel monitor mymaster 127.0.0.1 7010 1 ...@@ -3,4 +3,4 @@ sentinel monitor mymaster 127.0.0.1 7010 1
sentinel down-after-milliseconds mymaster 1000 sentinel down-after-milliseconds mymaster 1000
sentinel failover-timeout mymaster 2000 sentinel failover-timeout mymaster 2000
sentinel config-epoch mymaster 0 sentinel config-epoch mymaster 0
dir "Temp" dir "../Temp"
\ No newline at end of file \ No newline at end of file
# Ignore everything in this directory
*
# Except this file
!.gitignore
\ No newline at end of file
@%~dp0\3.0.503\redis-cli.exe -h 127.0.0.1 -p 7000
@%~dp0\3.0.503\redis-cli.exe -h 127.0.0.1 -p 7001
@%~dp0\3.0.503\redis-cli.exe -h 127.0.0.1 -p 7002
@%~dp0\3.0.503\redis-cli.exe -h 127.0.0.1 -p 7003
@%~dp0\3.0.503\redis-cli.exe -h 127.0.0.1 -p 7004
@%~dp0\3.0.503\redis-cli.exe -h 127.0.0.1 -p 7005
@echo off
echo Starting Redis servers for testing...
call %~dp0\start-basic.cmd
call %~dp0\start-cluster.cmd
call %~dp0\start-sentinel.cmd
echo Servers started (minimized).
@echo off
echo Starting Basic:
pushd %~dp0\Basic
echo Master: 6379
@start "Redis (Master): 6379" /min ..\3.0.503\redis-server.exe master-6379.conf
echo Slave: 6380
@start "Redis (Slave): 6380" /min ..\3.0.503\redis-server.exe slave-6380.conf
echo Secure: 6381
@start "Redis (Secure): 6381" /min ..\3.0.503\redis-server.exe secure-6381.conf
popd
\ No newline at end of file
@echo off @echo off
echo Starting Cluster: 7000-7005 echo Starting Cluster: 7000-7005
pushd %~dp0\Cluster\7000 pushd %~dp0\Cluster
@start "Redis (Cluster): 7000" /min ..\..\3.0.503\redis-server.exe redis.conf @start "Redis (Cluster): 7000" /min ..\3.0.503\redis-server.exe cluster-7000.conf
popd @start "Redis (Cluster): 7001" /min ..\3.0.503\redis-server.exe cluster-7001.conf
pushd %~dp0\Cluster\7001 @start "Redis (Cluster): 7002" /min ..\3.0.503\redis-server.exe cluster-7002.conf
@start "Redis (Cluster): 7001" /min ..\..\3.0.503\redis-server.exe redis.conf @start "Redis (Cluster): 7003" /min ..\3.0.503\redis-server.exe cluster-7003.conf
popd @start "Redis (Cluster): 7004" /min ..\3.0.503\redis-server.exe cluster-7004.conf
pushd %~dp0\Cluster\7002 @start "Redis (Cluster): 7005" /min ..\3.0.503\redis-server.exe cluster-7005.conf
@start "Redis (Cluster): 7002" /min ..\..\3.0.503\redis-server.exe redis.conf
popd
pushd %~dp0\Cluster\7003
@start "Redis (Cluster): 7003" /min ..\..\3.0.503\redis-server.exe redis.conf
popd
pushd %~dp0\Cluster\7004
@start "Redis (Cluster): 7004" /min ..\..\3.0.503\redis-server.exe redis.conf
popd
pushd %~dp0\Cluster\7005
@start "Redis (Cluster): 7005" /min ..\..\3.0.503\redis-server.exe redis.conf
popd popd
\ No newline at end of file
@echo off
echo Starting Redis servers on 6379, 6780, 6381, and 7000-7005
@start "Redis (Master): 6379" /min %~dp0\3.0.503\redis-server.exe %~dp0\master.conf
@start "Redis (Slave): 6380" /min %~dp0\3.0.503\redis-server.exe %~dp0\slave.conf
@start "Redis (Secure): 6381" /min %~dp0\3.0.503\redis-server.exe %~dp0\secure.conf
call %~dp0\start-cluster.cmd
call %~dp0\start-sentinel.cmd
echo Servers started (minimized).
@%~dp0\3.0.503\redis-server.exe %~dp0\master.conf
@%~dp0\3.0.503\redis-server.exe %~dp0\secure.conf
@echo off @echo off
echo Starting Sentinel Targets: 7010-7011 echo Starting Sentinel:
pushd %~dp0\Sentinel pushd %~dp0\Sentinel
echo Targets: 7010-7011
@start "Redis (Sentinel-Target): 7010" /min ..\3.0.503\redis-server.exe redis-7010.conf @start "Redis (Sentinel-Target): 7010" /min ..\3.0.503\redis-server.exe redis-7010.conf
@start "Redis (Sentinel-Target): 7011" /min ..\3.0.503\redis-server.exe redis-7011.conf @start "Redis (Sentinel-Target): 7011" /min ..\3.0.503\redis-server.exe redis-7011.conf
echo Starting Sentinel Monitors: 26379-26380 echo Monitors: 26379-26380
@start "Redis (Sentinel): 26379" /min ..\3.0.503\redis-server.exe sentinel-26379.conf --sentinel @start "Redis (Sentinel): 26379" /min ..\3.0.503\redis-server.exe sentinel-26379.conf --sentinel
@start "Redis (Sentinel): 26380" /min ..\3.0.503\redis-server.exe sentinel-26380.conf --sentinel @start "Redis (Sentinel): 26380" /min ..\3.0.503\redis-server.exe sentinel-26380.conf --sentinel
popd popd
\ No newline at end of file
@%~dp0\3.0.503\redis-server.exe %~dp0\slave.conf
...@@ -12,22 +12,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ...@@ -12,22 +12,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RedisConfigs", "RedisConfigs", "{96E891CD-2ED7-4293-A7AB-4C6F5D8D2B05}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RedisConfigs", "RedisConfigs", "{96E891CD-2ED7-4293-A7AB-4C6F5D8D2B05}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
RedisConfigs\master.conf = RedisConfigs\master.conf RedisConfigs\cli-master.cmd = RedisConfigs\cli-master.cmd
RedisConfigs\redis-cli 7000.cmd = RedisConfigs\redis-cli 7000.cmd RedisConfigs\cli-secure.cmd = RedisConfigs\cli-secure.cmd
RedisConfigs\redis-cli 7001.cmd = RedisConfigs\redis-cli 7001.cmd RedisConfigs\cli-slave.cmd = RedisConfigs\cli-slave.cmd
RedisConfigs\redis-cli 7002.cmd = RedisConfigs\redis-cli 7002.cmd RedisConfigs\start-all.cmd = RedisConfigs\start-all.cmd
RedisConfigs\redis-cli 7003.cmd = RedisConfigs\redis-cli 7003.cmd RedisConfigs\start-basic.cmd = RedisConfigs\start-basic.cmd
RedisConfigs\redis-cli 7004.cmd = RedisConfigs\redis-cli 7004.cmd RedisConfigs\start-cluster.cmd = RedisConfigs\start-cluster.cmd
RedisConfigs\redis-cli 7005.cmd = RedisConfigs\redis-cli 7005.cmd RedisConfigs\start-sentinel.cmd = RedisConfigs\start-sentinel.cmd
RedisConfigs\redis-cli master.cmd = RedisConfigs\redis-cli master.cmd
RedisConfigs\redis-cli secure.cmd = RedisConfigs\redis-cli secure.cmd
RedisConfigs\redis-cli slave.cmd = RedisConfigs\redis-cli slave.cmd
RedisConfigs\redis-server all local.cmd = RedisConfigs\redis-server all local.cmd
RedisConfigs\redis-server master.cmd = RedisConfigs\redis-server master.cmd
RedisConfigs\redis-server secure.cmd = RedisConfigs\redis-server secure.cmd
RedisConfigs\redis-server slave.cmd = RedisConfigs\redis-server slave.cmd
RedisConfigs\secure.conf = RedisConfigs\secure.conf
RedisConfigs\slave.conf = RedisConfigs\slave.conf
EndProjectSection EndProjectSection
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StackExchange.Redis", "StackExchange.Redis\StackExchange.Redis.csproj", "{EF84877F-59BE-41BE-9013-E765AF0BB72E}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StackExchange.Redis", "StackExchange.Redis\StackExchange.Redis.csproj", "{EF84877F-59BE-41BE-9013-E765AF0BB72E}"
...@@ -42,6 +33,37 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NRediSearch", "NRediSearch\ ...@@ -42,6 +33,37 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NRediSearch", "NRediSearch\
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NRediSearch.Test", "NRediSearch.Test\NRediSearch.Test.csproj", "{94D233F5-2400-4542-98B9-BA72005C57DC}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NRediSearch.Test", "NRediSearch.Test\NRediSearch.Test.csproj", "{94D233F5-2400-4542-98B9-BA72005C57DC}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sentinel", "Sentinel", "{36255A0A-89EC-43C8-A642-F4C1ACAEF5BC}"
ProjectSection(SolutionItems) = preProject
RedisConfigs\Sentinel\redis-7010.conf = RedisConfigs\Sentinel\redis-7010.conf
RedisConfigs\Sentinel\redis-7011.conf = RedisConfigs\Sentinel\redis-7011.conf
RedisConfigs\Sentinel\sentinel-26379.conf = RedisConfigs\Sentinel\sentinel-26379.conf
RedisConfigs\Sentinel\sentinel-26380.conf = RedisConfigs\Sentinel\sentinel-26380.conf
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Cluster", "Cluster", "{A3B4B972-5BD2-4D90-981F-7E51E350E628}"
ProjectSection(SolutionItems) = preProject
RedisConfigs\Cluster\cluster-7000.conf = RedisConfigs\Cluster\cluster-7000.conf
RedisConfigs\Cluster\cluster-7001.conf = RedisConfigs\Cluster\cluster-7001.conf
RedisConfigs\Cluster\cluster-7002.conf = RedisConfigs\Cluster\cluster-7002.conf
RedisConfigs\Cluster\cluster-7003.conf = RedisConfigs\Cluster\cluster-7003.conf
RedisConfigs\Cluster\cluster-7004.conf = RedisConfigs\Cluster\cluster-7004.conf
RedisConfigs\Cluster\cluster-7005.conf = RedisConfigs\Cluster\cluster-7005.conf
RedisConfigs\Cluster\nodes-7000.conf = RedisConfigs\Cluster\nodes-7000.conf
RedisConfigs\Cluster\nodes-7001.conf = RedisConfigs\Cluster\nodes-7001.conf
RedisConfigs\Cluster\nodes-7002.conf = RedisConfigs\Cluster\nodes-7002.conf
RedisConfigs\Cluster\nodes-7003.conf = RedisConfigs\Cluster\nodes-7003.conf
RedisConfigs\Cluster\nodes-7004.conf = RedisConfigs\Cluster\nodes-7004.conf
RedisConfigs\Cluster\nodes-7005.conf = RedisConfigs\Cluster\nodes-7005.conf
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Basic", "Basic", "{38BDEEED-7BEB-4B1F-9CE0-256D63F9C502}"
ProjectSection(SolutionItems) = preProject
RedisConfigs\Basic\master-6379.conf = RedisConfigs\Basic\master-6379.conf
RedisConfigs\Basic\secure-6381.conf = RedisConfigs\Basic\secure-6381.conf
RedisConfigs\Basic\slave-6380.conf = RedisConfigs\Basic\slave-6380.conf
EndProjectSection
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
...@@ -115,6 +137,11 @@ Global ...@@ -115,6 +137,11 @@ Global
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{36255A0A-89EC-43C8-A642-F4C1ACAEF5BC} = {96E891CD-2ED7-4293-A7AB-4C6F5D8D2B05}
{A3B4B972-5BD2-4D90-981F-7E51E350E628} = {96E891CD-2ED7-4293-A7AB-4C6F5D8D2B05}
{38BDEEED-7BEB-4B1F-9CE0-256D63F9C502} = {96E891CD-2ED7-4293-A7AB-4C6F5D8D2B05}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {193AA352-6748-47C1-A5FC-C9AA6B5F000B} SolutionGuid = {193AA352-6748-47C1-A5FC-C9AA6B5F000B}
EndGlobalSection EndGlobalSection
......
...@@ -4,46 +4,7 @@ init: ...@@ -4,46 +4,7 @@ init:
- git config --global core.autocrlf input - git config --global core.autocrlf input
install: install:
- cmd: >- - cmd: start RedisConfigs\start-all.cmd
cd RedisConfigs\3.0.503
redis-server.exe --service-install --service-name "redis-master" "..\master.conf"
redis-server.exe --service-install --service-name "redis-slave" "..\slave.conf"
redis-server.exe --service-install --service-name "redis-secure" "..\secure.conf"
redis-server.exe --service-start --service-name "redis-master"
redis-server.exe --service-start --service-name "redis-slave"
redis-server.exe --service-start --service-name "redis-secure"
redis-server.exe --service-install --service-name "redis-7000" "..\Cluster\7000\redis.conf" --dir "..\Cluster\7000"
redis-server.exe --service-install --service-name "redis-7001" "..\Cluster\7001\redis.conf" --dir "..\Cluster\7001"
redis-server.exe --service-install --service-name "redis-7002" "..\Cluster\7002\redis.conf" --dir "..\Cluster\7002"
redis-server.exe --service-install --service-name "redis-7003" "..\Cluster\7003\redis.conf" --dir "..\Cluster\7003"
redis-server.exe --service-install --service-name "redis-7004" "..\Cluster\7004\redis.conf" --dir "..\Cluster\7004"
redis-server.exe --service-install --service-name "redis-7005" "..\Cluster\7005\redis.conf" --dir "..\Cluster\7005"
redis-server.exe --service-start --service-name "redis-7000"
redis-server.exe --service-start --service-name "redis-7001"
redis-server.exe --service-start --service-name "redis-7002"
redis-server.exe --service-start --service-name "redis-7003"
redis-server.exe --service-start --service-name "redis-7004"
redis-server.exe --service-start --service-name "redis-7005"
cd ..\..
skip_branch_with_pr: true skip_branch_with_pr: true
skip_tags: true skip_tags: true
......
...@@ -35,7 +35,7 @@ The tests are run (by default) as part of the build. You can simply run this in ...@@ -35,7 +35,7 @@ The tests are run (by default) as part of the build. You can simply run this in
To specifically run the tests with far more options, from the repository root: To specifically run the tests with far more options, from the repository root:
```cmd ```cmd
dotnet build dotnet build
.\RedisConfigs\start-for-tests.cmd .\RedisConfigs\start-all.cmd
cd StackExchange.Redis.Tests cd StackExchange.Redis.Tests
dotnet xunit dotnet xunit
``` ```
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment