/usr/share/augeas/lenses/dist/tests/test_redis.aug is in augeas-lenses 1.2.0-0ubuntu1.3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | (*
Module: Test_Redis
Provides unit tests and examples for the <Redis> lens.
*)
module Test_Redis =
let standard_entry = "dir /var/lib/redis\n"
test Redis.lns get standard_entry = { "dir" = "/var/lib/redis" }
let double_quoted_entry = "dir \"/var/lib/redis\"\n"
test Redis.lns get double_quoted_entry = { "dir" = "/var/lib/redis" }
let single_quoted_entry = "dir '/var/lib/redis'\n"
test Redis.lns get single_quoted_entry = { "dir" = "/var/lib/redis" }
let extra_whitespace_entry = " dir /var/lib/redis \n"
test Redis.lns get extra_whitespace_entry = { "dir" = "/var/lib/redis" }
let save_entry = "save 60 10000\n"
test Redis.lns get save_entry =
{ "save"
{ "seconds" = "60" }
{ "keys" = "10000" }
}
let save_entry_quotes = "save '60' \"10000\"\n"
test Redis.lns get save_entry_quotes =
{ "save"
{ "seconds" = "60" }
{ "keys" = "10000" }
}
let slaveof_entry = "slaveof 192.168.0.10 6379\n"
test Redis.lns get slaveof_entry =
{ "slaveof"
{ "ip" = "192.168.0.10" }
{ "port" = "6379" }
}
let rename_command_entry = "rename-command CONFIG CONFIG2\n"
test Redis.lns get rename_command_entry =
{ "rename-command"
{ "from" = "CONFIG" }
{ "to" = "CONFIG2" }
}
let client_output_buffer_limit_entry_1 = "client-output-buffer-limit normal 0 0 0\n"
test Redis.lns get client_output_buffer_limit_entry_1 =
{ "client-output-buffer-limit"
{ "class" = "normal" }
{ "hard_limit" = "0" }
{ "soft_limit" = "0" }
{ "soft_seconds" = "0" }
}
let client_output_buffer_limit_entry_2 = "client-output-buffer-limit slave 256mb 64mb 60\n"
test Redis.lns get client_output_buffer_limit_entry_2 =
{ "client-output-buffer-limit"
{ "class" = "slave" }
{ "hard_limit" = "256mb" }
{ "soft_limit" = "64mb" }
{ "soft_seconds" = "60" }
}
let include_entry = "include /foo/redis.conf\ninclude /bar/redis.conf\n"
test Redis.lns get include_entry =
{ "include" = "/foo/redis.conf" }
{ "include" = "/bar/redis.conf" }
let standard_comment = "# a comment\n"
test Redis.lns get standard_comment = { "#comment" = "a comment" }
let extra_whitespace_comment = " # another comment \n"
test Redis.lns get extra_whitespace_comment = { "#comment" = "another comment" }
let redis_conf = "# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specifiy
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
# 1gb => 1024*1024*1024 bytes
#
# units are case insensitive so 1GB 1Gb 1gB are all the same.
# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize yes
# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
# default. You can specify a custom pid file location here.
pidfile /var/run/redis/redis-server.pid
# Accept connections on the specified port, default is 6379.
# If port 0 is specified Redis will not listen on a TCP socket.
port 6379
# If you want you can bind a single interface, if the bind option is not
# specified all the interfaces will listen for incoming connections.
#
bind 127.0.0.1
# Note: you can disable saving at all commenting all the \"save\" lines.
save 900 1
save 300 10
save 60 10000
# Include one or more other config files here. This is useful if you
# have a standard template that goes to all redis server but also need
# to customize a few per-server settings. Include files can include
# other files, so use this wisely.
#
include /path/to/local.conf
include /path/to/other.conf
"
test Redis.lns get redis_conf =
{ "#comment" = "Redis configuration file example" }
{ }
{ "#comment" = "Note on units: when memory size is needed, it is possible to specifiy" }
{ "#comment" = "it in the usual form of 1k 5GB 4M and so forth:" }
{ }
{ "#comment" = "1k => 1000 bytes" }
{ "#comment" = "1kb => 1024 bytes" }
{ "#comment" = "1m => 1000000 bytes" }
{ "#comment" = "1mb => 1024*1024 bytes" }
{ "#comment" = "1g => 1000000000 bytes" }
{ "#comment" = "1gb => 1024*1024*1024 bytes" }
{ }
{ "#comment" = "units are case insensitive so 1GB 1Gb 1gB are all the same." }
{ }
{ "#comment" = "By default Redis does not run as a daemon. Use 'yes' if you need it." }
{ "#comment" = "Note that Redis will write a pid file in /var/run/redis.pid when daemonized." }
{ "daemonize" = "yes" }
{ }
{ "#comment" = "When running daemonized, Redis writes a pid file in /var/run/redis.pid by" }
{ "#comment" = "default. You can specify a custom pid file location here." }
{ "pidfile" = "/var/run/redis/redis-server.pid" }
{ }
{ "#comment" = "Accept connections on the specified port, default is 6379." }
{ "#comment" = "If port 0 is specified Redis will not listen on a TCP socket." }
{ "port" = "6379" }
{ }
{ "#comment" = "If you want you can bind a single interface, if the bind option is not" }
{ "#comment" = "specified all the interfaces will listen for incoming connections." }
{ }
{ "bind" = "127.0.0.1" }
{ }
{ "#comment" = "Note: you can disable saving at all commenting all the \"save\" lines." }
{ }
{ "save"
{ "seconds" = "900" }
{ "keys" = "1" }
}
{ "save"
{ "seconds" = "300" }
{ "keys" = "10" }
}
{ "save"
{ "seconds" = "60" }
{ "keys" = "10000" }
}
{ }
{ "#comment" = "Include one or more other config files here. This is useful if you" }
{ "#comment" = "have a standard template that goes to all redis server but also need" }
{ "#comment" = "to customize a few per-server settings. Include files can include" }
{ "#comment" = "other files, so use this wisely." }
{ }
{ "include" = "/path/to/local.conf" }
{ "include" = "/path/to/other.conf" }
|