@@ -65,28 +65,21 @@ protected void tearDown()
6565 protected void addRestrictedAccount ()
6666 throws IOException
6767 {
68- runCtl ("add_user test test" );
69- runCtl ("add_user testadmin test" );
70- runCtl ("add_vhost /test" );
71- runCtl ("set_permissions -p /test test configure write read" );
72- runCtl ("set_permissions -p /test testadmin \" .*\" \" .*\" \" .*\" " );
68+ Host . rabbitmqctl ("add_user test test" );
69+ Host . rabbitmqctl ("add_user testadmin test" );
70+ Host . rabbitmqctl ("add_vhost /test" );
71+ Host . rabbitmqctl ("set_permissions -p /test test configure write read" );
72+ Host . rabbitmqctl ("set_permissions -p /test testadmin \" .*\" \" .*\" \" .*\" " );
7373 }
7474
7575 protected void deleteRestrictedAccount ()
7676 throws IOException
7777 {
78- runCtl ("clear_permissions -p /test testadmin" );
79- runCtl ("clear_permissions -p /test test" );
80- runCtl ("delete_vhost /test" );
81- runCtl ("delete_user testadmin" );
82- runCtl ("delete_user test" );
83- }
84-
85- protected void runCtl (String command )
86- throws IOException
87- {
88- Host .executeCommand ("../rabbitmq-server/scripts/rabbitmqctl " +
89- command );
78+ Host .rabbitmqctl ("clear_permissions -p /test testadmin" );
79+ Host .rabbitmqctl ("clear_permissions -p /test test" );
80+ Host .rabbitmqctl ("delete_vhost /test" );
81+ Host .rabbitmqctl ("delete_user testadmin" );
82+ Host .rabbitmqctl ("delete_user test" );
9083 }
9184
9285 protected void createResources ()
@@ -241,7 +234,7 @@ public void testAltExchConfiguration()
241234 public void testNoAccess ()
242235 throws IOException , InterruptedException
243236 {
244- runCtl ("set_permissions -p /test test \" \" \" \" \" \" " );
237+ Host . rabbitmqctl ("set_permissions -p /test test \" \" \" \" \" \" " );
245238 Thread .sleep (2000 );
246239
247240 expectExceptionRun (AMQP .ACCESS_REFUSED , new WithName () {
0 commit comments