@@ -93,6 +93,7 @@ all_tests() -> [
9393 permissions_administrator_test ,
9494 permissions_vhost_test ,
9595 permissions_amqp_test ,
96+ permissions_queue_delete_test ,
9697 permissions_connection_channel_consumer_test ,
9798 consumers_cq_test ,
9899 consumers_qq_test ,
@@ -148,7 +149,8 @@ all_tests() -> [
148149 rates_test ,
149150 single_active_consumer_cq_test ,
150151 single_active_consumer_qq_test ,
151- % % oauth_test, %% disabled until we are able to enable oauth2 plugin
152+ % % This test needs the OAuth 2 plugin to be enabled
153+ % % oauth_test,
152154 disable_basic_auth_test ,
153155 login_test ,
154156 csp_headers_test ,
@@ -1427,6 +1429,18 @@ permissions_amqp_test(Config) ->
14271429 http_delete (Config , " /users/myuser" , {group , '2xx' }),
14281430 passed .
14291431
1432+ permissions_queue_delete_test (Config ) ->
1433+ QArgs = #{},
1434+ PermArgs = [{configure , <<" foo.*" >>}, {write , <<" .*" >>}, {read , <<" .*" >>}],
1435+ http_put (Config , " /users/myuser" , [{password , <<" myuser" >>},
1436+ {tags , <<" management" >>}], {group , '2xx' }),
1437+ http_put (Config , " /permissions/%2F/myuser" , PermArgs , {group , '2xx' }),
1438+ http_put (Config , " /queues/%2F/bar-queue" , QArgs , {group , '2xx' }),
1439+ http_delete (Config , " /queues/%2F/bar-queue" , " myuser" , " myuser" , ? NOT_AUTHORISED ),
1440+ http_delete (Config , " /queues/%2F/bar-queue" , {group , '2xx' }),
1441+ http_delete (Config , " /users/myuser" , {group , '2xx' }),
1442+ passed .
1443+
14301444% % Opens a new connection and a channel on it.
14311445% % The channel is not managed by rabbit_ct_client_helpers and
14321446% % should be explicitly closed by the caller.
0 commit comments