mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
Change how redis-server is run during btests, removing redis.conf
This commit is contained in:
parent
9ed3e33f97
commit
b81e876ec8
7 changed files with 26 additions and 94 deletions
|
@ -1,73 +0,0 @@
|
|||
bind 127.0.0.1
|
||||
port %REDIS_PORT%
|
||||
pidfile %RUN_PATH%/redis.pid
|
||||
loglevel verbose
|
||||
logfile %RUN_PATH%/redis.log
|
||||
dir %RUN_PATH%
|
||||
daemonize no
|
||||
databases 1
|
||||
|
||||
# All of the values from here down are the default values in the sample config file
|
||||
# that comes with redis-server v7.2.7.
|
||||
protected-mode yes
|
||||
tcp-backlog 511
|
||||
timeout 0
|
||||
always-show-logo no
|
||||
set-proc-title yes
|
||||
proc-title-template "{title} {listen-addr} {server-mode}"
|
||||
stop-writes-on-bgsave-error yes
|
||||
rdbcompression yes
|
||||
rdbchecksum yes
|
||||
dbfilename dump.rdb
|
||||
rdb-del-sync-files no
|
||||
replica-serve-stale-data yes
|
||||
replica-read-only yes
|
||||
repl-diskless-sync yes
|
||||
repl-diskless-sync-delay 5
|
||||
repl-diskless-sync-max-replicas 0
|
||||
repl-diskless-load disabled
|
||||
repl-disable-tcp-nodelay no
|
||||
replica-priority 100
|
||||
acllog-max-len 128
|
||||
lazyfree-lazy-eviction no
|
||||
lazyfree-lazy-expire no
|
||||
lazyfree-lazy-server-del no
|
||||
replica-lazy-flush no
|
||||
lazyfree-lazy-user-del no
|
||||
lazyfree-lazy-user-flush no
|
||||
oom-score-adj no
|
||||
oom-score-adj-values 0 200 800
|
||||
disable-thp yes
|
||||
appendonly no
|
||||
appendfilename "appendonly.aof"
|
||||
appenddirname "appendonlydir"
|
||||
appendfsync everysec
|
||||
no-appendfsync-on-rewrite no
|
||||
auto-aof-rewrite-percentage 100
|
||||
auto-aof-rewrite-min-size 64mb
|
||||
aof-load-truncated yes
|
||||
aof-use-rdb-preamble yes
|
||||
aof-timestamp-enabled no
|
||||
slowlog-log-slower-than 10000
|
||||
slowlog-max-len 128
|
||||
latency-monitor-threshold 0
|
||||
notify-keyspace-events ""
|
||||
hash-max-listpack-entries 512
|
||||
hash-max-listpack-value 64
|
||||
list-max-listpack-size -2
|
||||
list-compress-depth 0
|
||||
set-max-intset-entries 512
|
||||
zset-max-listpack-entries 128
|
||||
zset-max-listpack-value 64
|
||||
hll-sparse-max-bytes 3000
|
||||
stream-node-max-bytes 4096
|
||||
stream-node-max-entries 100
|
||||
activerehashing yes
|
||||
client-output-buffer-limit normal 0 0 0
|
||||
client-output-buffer-limit replica 256mb 64mb 60
|
||||
client-output-buffer-limit pubsub 32mb 8mb 60
|
||||
hz 10
|
||||
dynamic-hz yes
|
||||
aof-rewrite-incremental-fsync yes
|
||||
rdb-save-incremental-fsync yes
|
||||
jemalloc-bg-thread yes
|
|
@ -3,10 +3,7 @@
|
|||
# @TEST-REQUIRES: have-redis
|
||||
# @TEST-PORT: REDIS_PORT
|
||||
|
||||
# Generate a redis.conf file with the port defined above, but without the /tcp at the end of
|
||||
# it. This also sets some paths in the conf to the testing directory.
|
||||
# @TEST-EXEC: cat $FILES/redis.conf | sed "s|%REDIS_PORT%|${REDIS_PORT%/tcp}|g" | sed "s|%RUN_PATH%|$(pwd)|g" > ./redis.conf
|
||||
# @TEST-EXEC: btest-bg-run redis redis-server ../redis.conf
|
||||
# @TEST-EXEC: btest-bg-run redis-server run-redis-server ${REDIS_PORT%/tcp}
|
||||
# @TEST-EXEC: zeek -r $TRACES/http/get.trace -b %INPUT > out
|
||||
# @TEST-EXEC: btest-bg-wait -k 0
|
||||
|
||||
|
|
|
@ -3,10 +3,7 @@
|
|||
# @TEST-REQUIRES: have-redis
|
||||
# @TEST-PORT: REDIS_PORT
|
||||
|
||||
# Generate a redis.conf file with the port defined above, but without the /tcp at the end of
|
||||
# it. This also sets some paths in the conf to the testing directory.
|
||||
# @TEST-EXEC: cat $FILES/redis.conf | sed "s|%REDIS_PORT%|${REDIS_PORT%/tcp}|g" | sed "s|%RUN_PATH%|$(pwd)|g" > ./redis.conf
|
||||
# @TEST-EXEC: btest-bg-run redis redis-server ../redis.conf
|
||||
# @TEST-EXEC: btest-bg-run redis-server run-redis-server ${REDIS_PORT%/tcp}
|
||||
# @TEST-EXEC: zeek -b %INPUT > out
|
||||
# @TEST-EXEC: btest-bg-wait -k 0
|
||||
|
||||
|
|
|
@ -6,11 +6,7 @@
|
|||
# @TEST-PORT: BROKER_PORT2
|
||||
# @TEST-PORT: BROKER_PORT3
|
||||
|
||||
# Generate a redis.conf file with the port defined above, but without the /tcp at the end of
|
||||
# it. This also sets some paths in the conf to the testing directory.
|
||||
# @TEST-EXEC: cat $FILES/redis.conf | sed "s|%REDIS_PORT%|${REDIS_PORT%/tcp}|g" | sed "s|%RUN_PATH%|$(pwd)|g" > ./redis.conf
|
||||
# @TEST-EXEC: btest-bg-run redis redis-server ../redis.conf
|
||||
|
||||
# @TEST-EXEC: btest-bg-run redis-server run-redis-server ${REDIS_PORT%/tcp}
|
||||
# @TEST-EXEC: btest-bg-run manager-1 ZEEKPATH=$ZEEKPATH:.. CLUSTER_NODE=manager-1 zeek -b %INPUT
|
||||
# @TEST-EXEC: btest-bg-run worker-1 ZEEKPATH=$ZEEKPATH:.. CLUSTER_NODE=worker-1 zeek -b %INPUT
|
||||
# @TEST-EXEC: btest-bg-run worker-2 ZEEKPATH=$ZEEKPATH:.. CLUSTER_NODE=worker-2 zeek -b %INPUT
|
||||
|
|
|
@ -3,10 +3,7 @@
|
|||
# @TEST-REQUIRES: have-redis
|
||||
# @TEST-PORT: REDIS_PORT
|
||||
|
||||
# Generate a redis.conf file with the port defined above, but without the /tcp at the end of
|
||||
# it. This also sets some paths in the conf to the testing directory.
|
||||
# @TEST-EXEC: cat $FILES/redis.conf | sed "s|%REDIS_PORT%|${REDIS_PORT%/tcp}|g" | sed "s|%RUN_PATH%|$(pwd)|g" > ./redis.conf
|
||||
# @TEST-EXEC: btest-bg-run redis redis-server ../redis.conf
|
||||
# @TEST-EXEC: btest-bg-run redis-server run-redis-server ${REDIS_PORT%/tcp}
|
||||
# @TEST-EXEC: zcat <$TRACES/echo-connections.pcap.gz | zeek -B storage -b -Cr - %INPUT > out
|
||||
# @TEST-EXEC: btest-bg-wait -k 1
|
||||
|
||||
|
|
|
@ -3,10 +3,7 @@
|
|||
# @TEST-REQUIRES: have-redis
|
||||
# @TEST-PORT: REDIS_PORT
|
||||
|
||||
# Generate a redis.conf file with the port defined above, but without the /tcp at the end of
|
||||
# it. This also sets some paths in the conf to the testing directory.
|
||||
# @TEST-EXEC: cat $FILES/redis.conf | sed "s|%REDIS_PORT%|${REDIS_PORT%/tcp}|g" | sed "s|%RUN_PATH%|$(pwd)|g" > ./redis.conf
|
||||
# @TEST-EXEC: btest-bg-run redis redis-server ../redis.conf
|
||||
# @TEST-EXEC: btest-bg-run redis-server run-redis-server ${REDIS_PORT%/tcp}
|
||||
# @TEST-EXEC: zeek -b %INPUT > out
|
||||
# @TEST-EXEC: btest-bg-wait -k 0
|
||||
|
||||
|
|
21
testing/scripts/run-redis-server
Executable file
21
testing/scripts/run-redis-server
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eux
|
||||
|
||||
if ! redis-server --version; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage $0 <listen_port>" >2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
listen_port=$1
|
||||
|
||||
exec redis-server \
|
||||
--bind 127.0.0.1 \
|
||||
--port ${listen_port} \
|
||||
--loglevel verbose \
|
||||
--logfile redis.log \
|
||||
--pidfile redis.pid \
|
||||
--databases 1
|
Loading…
Add table
Add a link
Reference in a new issue