diff options
| author | Daniil Fedotov <dfedotov@pivotal.io> | 2016-10-12 12:08:35 +0100 |
|---|---|---|
| committer | Daniil Fedotov <dfedotov@pivotal.io> | 2016-10-12 12:08:35 +0100 |
| commit | 92cdd72f8caa7e968c89143247df1883ba656975 (patch) | |
| tree | f41c315fc1624572d1e52c6da52aae79f8d4a544 | |
| parent | c900c50e40676793bc22e8784a121102a813210f (diff) | |
| download | rabbitmq-server-git-92cdd72f8caa7e968c89143247df1883ba656975.tar.gz | |
More tests for cluster config
| -rw-r--r-- | test/config_schema_SUITE.erl | 13 | ||||
| -rw-r--r-- | test/config_schema_SUITE_data/snippets.config | 14 |
2 files changed, 25 insertions, 2 deletions
diff --git a/test/config_schema_SUITE.erl b/test/config_schema_SUITE.erl index 79e7220e98..bac21d9ee0 100644 --- a/test/config_schema_SUITE.erl +++ b/test/config_schema_SUITE.erl @@ -89,12 +89,21 @@ run_snippets(Config) -> run_snippets1(Config) -> {ok, [Snippets]} = file:consult(?config(conf_snippets, Config)), lists:map( - fun({N, S, C, P}) -> ok = test_snippet(Config, {integer_to_list(N), S, []}, C, P); - ({N, S, A, C, P}) -> ok = test_snippet(Config, {integer_to_list(N), S, A}, C, P) + fun({N, S, C, P}) -> ok = test_snippet(Config, {snippet_id(N), S, []}, C, P); + ({N, S, A, C, P}) -> ok = test_snippet(Config, {snippet_id(N), S, A}, C, P) end, Snippets), passed. +snippet_id(N) when is_integer(N) -> + integer_to_list(N); +snippet_id(F) when is_float(F) -> + float_to_list(F); +snippet_id(A) when is_atom(A) -> + atom_to_list(A); +snippet_id(L) when is_list(L) -> + L. + test_snippet(Config, Snippet, Expected, _Plugins) -> {ConfFile, AdvancedFile} = write_snippet(Config, Snippet), {ok, GeneratedFile} = generate_config(Config, ConfFile, AdvancedFile), diff --git a/test/config_schema_SUITE_data/snippets.config b/test/config_schema_SUITE_data/snippets.config index 45d9d73936..f1d3666181 100644 --- a/test/config_schema_SUITE_data/snippets.config +++ b/test/config_schema_SUITE_data/snippets.config @@ -101,6 +101,20 @@ autocluster.classic_config.node_type = disc", {cluster_nodes, {[rabbit@hostname2,rabbit@hostname1], disc}} ]}],[]} , +{13.1, +"autocluster.classic_config.nodes.peer1 = rabbit@hostname1 +autocluster.classic_config.nodes.peer2 = rabbit@hostname2 +autocluster.classic_config.node_type = disk", +[{rabbit, [ + {cluster_nodes, {[rabbit@hostname2,rabbit@hostname1], disc}} +]}],[]} +, +{13.2, +"autocluster.classic_config.node_type = ram", +[{rabbit, [ + {cluster_nodes, {[], ram}} +]}],[]} +, {14, "tcp_listen_options.backlog = 128 tcp_listen_options.nodelay = true |
