Config schema test for plugin

Part of [#141481501]
Moved from rabbitmq-server
This commit is contained in:
Daniil Fedotov 2017-03-17 11:02:44 +00:00
parent 55fd298b57
commit dd31979f57
5 changed files with 102 additions and 0 deletions

View File

@ -0,0 +1,64 @@
%% The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License at
%% http://www.mozilla.org/MPL/
%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
%% License for the specific language governing rights and limitations
%% under the License.
%%
%% The Original Code is RabbitMQ.
%%
%% The Initial Developer of the Original Code is GoPivotal, Inc.
%% Copyright (c) 2016 Pivotal Software, Inc. All rights reserved.
%%
-module(config_schema_SUITE).
-compile(export_all).
all() ->
[
run_snippets
].
%% -------------------------------------------------------------------
%% Testsuite setup/teardown.
%% -------------------------------------------------------------------
init_per_suite(Config) ->
rabbit_ct_helpers:log_environment(),
Config1 = rabbit_ct_helpers:run_setup_steps(Config),
rabbit_ct_config_schema:init_schemas(rabbitmq_web_stomp, Config1).
end_per_suite(Config) ->
rabbit_ct_helpers:run_teardown_steps(Config).
init_per_testcase(Testcase, Config) ->
rabbit_ct_helpers:testcase_started(Config, Testcase),
Config1 = rabbit_ct_helpers:set_config(Config, [
{rmq_nodename_suffix, Testcase}
]),
rabbit_ct_helpers:run_steps(Config1,
rabbit_ct_broker_helpers:setup_steps() ++
rabbit_ct_client_helpers:setup_steps()).
end_per_testcase(Testcase, Config) ->
Config1 = rabbit_ct_helpers:run_steps(Config,
rabbit_ct_client_helpers:teardown_steps() ++
rabbit_ct_broker_helpers:teardown_steps()),
rabbit_ct_helpers:testcase_finished(Config1, Testcase).
%% -------------------------------------------------------------------
%% Testcases.
%% -------------------------------------------------------------------
run_snippets(Config) ->
ok = rabbit_ct_broker_helpers:rpc(Config, 0,
?MODULE, run_snippets1, [Config]).
run_snippets1(Config) ->
rabbit_ct_config_schema:run_snippets(Config).

View File

@ -0,0 +1 @@
I'm not a certificate

View File

@ -0,0 +1 @@
I'm not a certificate

View File

@ -0,0 +1 @@
I'm not a certificate

View File

@ -0,0 +1,35 @@
[{port,
"web_stomp.port = 12345",
[{rabbitmq_web_stomp,[{port,12345}]}],
[rabbitmq_web_stomp]},
{ssl,
"web_stomp.ssl.port = 15671
web_stomp.ssl.backlog = 1024
web_stomp.ssl.certfile = test/config_schema_SUITE_data/certs/cert.pem
web_stomp.ssl.keyfile = test/config_schema_SUITE_data/certs/key.pem
web_stomp.ssl.cacertfile = test/config_schema_SUITE_data/certs/cacert.pem
web_stomp.ssl.password = changeme",
[{rabbitmq_web_stomp,
[{ssl_config,
[{port,15671},
{backlog,1024},
{certfile,"test/config_schema_SUITE_data/certs/cert.pem"},
{keyfile,"test/config_schema_SUITE_data/certs/key.pem"},
{cacertfile,"test/config_schema_SUITE_data/certs/cacert.pem"},
{password,"changeme"}]}]}],
[rabbitmq_web_stomp]},
{ws_frame,
"web_stomp.ws_frame = binary",
[{rabbitmq_web_stomp,[{ws_frame,binary}]}],
[rabbitmq_web_stomp]},
{cowboy_max_keepalive,
"web_stomp.cowboy_opts.max_keepalive = 10",
[{rabbitmq_web_stomp,[{cowboy_opts,[{max_keepalive,10}]}]}],
[rabbitmq_web_stomp]},
{sockjs_opts,
"web_stomp.sockjs_opts.url = https://cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js",
[{rabbitmq_web_stomp,
[{sockjs_opts,
[{sockjs_url,
"https://cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js"}]}]}],
[rabbitmq_web_stomp]}].