Server IP : 127.0.0.2 / Your IP : 3.141.29.119 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/augeas/lenses/dist/tests/ |
Upload File : |
(* 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" } (* Test: Redis.lns Empty value (GH issue #115) *) test Redis.lns get "notify-keyspace-events \"\"\n" = { "notify-keyspace-events" = "" }