Server IP : 85.214.239.14 / Your IP : 3.133.127.131 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/3/root/proc/3/task/3/root/usr/share/augeas/lenses/dist/tests/ |
Upload File : |
(* Module: Test_Rabbitmq Provides unit tests and examples for the <Rabbitmq> lens. *) module Test_Rabbitmq = (* Test: Rabbitmq.listeners *) test Rabbitmq.listeners get "{ssl_listeners, [5671, {\"127.0.0.1\", 5672}]}" = { "ssl_listeners" { "value" = "5671" } { "tuple" { "value" = "127.0.0.1" } { "value" = "5672" } } } (* Test: Rabbitmq.ssl_options *) test Rabbitmq.ssl_options get "{ssl_options, [ {cacertfile,\"/path/to/testca/cacert.pem\"}, {certfile,\"/path/to/server/cert.pem\"}, {keyfile,\"/path/to/server/key.pem\"}, {verify,verify_peer}, {versions, ['tlsv1.2', 'tlsv1.1', 'tlsv1']}, {fail_if_no_peer_cert,false}]}" = { "ssl_options" { "cacertfile" = "/path/to/testca/cacert.pem" } { "certfile" = "/path/to/server/cert.pem" } { "keyfile" = "/path/to/server/key.pem" } { "verify" = "verify_peer" } { "versions" { "value" = "tlsv1.2" } { "value" = "tlsv1.1" } { "value" = "tlsv1" } } { "fail_if_no_peer_cert" = "false" } } (* Test: Rabbitmq.disk_free_limit *) test Rabbitmq.disk_free_limit get "{disk_free_limit, 1000000000}" = { "disk_free_limit" = "1000000000" } (* Test: Rabbitmq.disk_free_limit *) test Rabbitmq.disk_free_limit get "{disk_free_limit, {mem_relative, 1.0}}" = { "disk_free_limit" { "tuple" { "value" = "mem_relative" } { "value" = "1.0" } } } (* Test: Rabbitmq.log_levels *) test Rabbitmq.log_levels get "{log_levels, [{connection, info}]}" = { "log_levels" { "tuple" { "value" = "connection" } { "value" = "info" } } } (* Test: Rabbitmq.cluster_nodes *) test Rabbitmq.cluster_nodes get "{cluster_nodes, {['rabbit@rabbit1', 'rabbit@rabbit2', 'rabbit@rabbit3'], disc}}" = { "cluster_nodes" { "tuple" { "value" { "value" = "rabbit@rabbit1" } { "value" = "rabbit@rabbit2" } { "value" = "rabbit@rabbit3" } } { "value" = "disc" } } } (* Test: Rabbitmq.cluster_nodes Apparently, tuples are not mandatory *) test Rabbitmq.cluster_nodes get "{cluster_nodes, ['rabbit@rabbit1', 'rabbit@rabbit2', 'rabbit@rabbit3']}" = { "cluster_nodes" { "value" = "rabbit@rabbit1" } { "value" = "rabbit@rabbit2" } { "value" = "rabbit@rabbit3" } } (* Test: Rabbitmq.cluster_partition_handling, single value *) test Rabbitmq.cluster_partition_handling get "{cluster_partition_handling, ignore}" = { "cluster_partition_handling" = "ignore" } (* Test: Rabbitmq.cluster_partition_handling, tuple *) test Rabbitmq.cluster_partition_handling get "{cluster_partition_handling, {pause_if_all_down, ['rabbit@rabbit1', 'rabbit@rabbit2', 'rabbit@rabbit3'], autoheal}}" = { "cluster_partition_handling" { "tuple" { "value" = "pause_if_all_down" } { "value" { "value" = "rabbit@rabbit1" } { "value" = "rabbit@rabbit2" } { "value" = "rabbit@rabbit3" } } { "value" = "autoheal" } } } (* Test: Rabbitmq.lns Top-level test *) test Rabbitmq.lns get " % A standard configuration [ {rabbit, [ {ssl_listeners, [5671]}, {ssl_options, [{cacertfile,\"/path/to/testca/cacert.pem\"}, {certfile,\"/path/to/server/cert.pem\"}, {keyfile,\"/path/to/server/key.pem\"}, {verify,verify_peer}, {fail_if_no_peer_cert,false}]} ]} ]. % EOF\n" = { } { "#comment" = "A standard configuration" } { "rabbit" { "ssl_listeners" { "value" = "5671" } } { "ssl_options" { "cacertfile" = "/path/to/testca/cacert.pem" } { "certfile" = "/path/to/server/cert.pem" } { "keyfile" = "/path/to/server/key.pem" } { "verify" = "verify_peer" } { "fail_if_no_peer_cert" = "false" } } } { "#comment" = "EOF" }