From ed7c67adcc6d1888f0e54773d484a739ef69caf7 Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 29 Sep 2022 11:09:09 +0200 Subject: [PATCH] fix: delete vhosts before running test suite. --- src/RabbitMQ.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/RabbitMQ.php b/src/RabbitMQ.php index f3607f4..75add93 100644 --- a/src/RabbitMQ.php +++ b/src/RabbitMQ.php @@ -29,6 +29,9 @@ static public function createVhosts() foreach (self::$vhosts as $vhost) { $vhost = str_replace('/', '%2f', $vhost); + // delete the vhost if it exists. See the comment bellow in deleteVhosts() + $client->delete("/api/vhosts/{$vhost}", [ 'http_errors' => false ]); + $client->put("/api/vhosts/{$vhost}"); $client->put(