Skip to content

Commit 30b764c

Browse files
Test new /api/versions endpoint
1 parent d8218de commit 30b764c

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

deps/rabbitmq_management/priv/www/js/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function getAccessToken() {
9191
function start_app_login () {
9292
app = new Sammy.Application(function () {
9393
this.get('/', function () {})
94-
this.get('#/', function () {})
94+
this.get('#/', function () {})
9595
if (!oauth.enabled || !oauth.oauth_disable_basic_auth) {
9696
this.put('#/login', function() {
9797
set_basic_auth(this.params['username'], this.params['password'])

deps/rabbitmq_management/test/rabbit_mgmt_http_SUITE.erl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ all() ->
5656
].
5757

5858
groups() ->
59-
[
59+
[
6060
{all_tests_with_prefix, [], some_tests() ++ all_tests()},
6161
{all_tests_without_prefix, [], some_tests()},
6262
%% We have several groups because their interference is
@@ -104,7 +104,6 @@ definitions_group4_tests() ->
104104
definitions_vhost_test
105105
].
106106

107-
108107
all_tests() -> [
109108
cli_redirect_test,
110109
api_redirect_test,
@@ -205,7 +204,8 @@ all_tests() -> [
205204
amqp_sessions,
206205
amqpl_sessions,
207206
enable_plugin_amqp,
208-
cluster_and_node_tags_test
207+
cluster_and_node_tags_test,
208+
version_test
209209
].
210210

211211
%% -------------------------------------------------------------------
@@ -3896,6 +3896,13 @@ oauth_test(Config) ->
38963896
%% cleanup
38973897
rpc(Config, application, unset_env, [rabbitmq_management, oauth_enabled]).
38983898

3899+
version_test(Config) ->
3900+
ActualVersion = http_get(Config, "/version"),
3901+
ct:log("ActualVersion : ~p", [ActualVersion]),
3902+
ExpectedVersion = rpc(Config, rabbit, base_product_version, []),
3903+
ct:log("ExpectedVersion : ~p", [ExpectedVersion]),
3904+
?assertEqual(ExpectedVersion, binary_to_list(ActualVersion)).
3905+
38993906
login_test(Config) ->
39003907
http_put(Config, "/users/myuser", [{password, <<"myuser">>},
39013908
{tags, <<"management">>}], {group, '2xx'}),

0 commit comments

Comments
 (0)