From 5ec0ed724c812cf8b1d72c49c635867f73179346 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Wed, 8 Apr 2026 08:47:29 +0100 Subject: [PATCH] Assert column creation responses in overwrite/skip tests --- tests/e2e/Services/Migrations/MigrationsBase.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/e2e/Services/Migrations/MigrationsBase.php b/tests/e2e/Services/Migrations/MigrationsBase.php index be249dfd83..b791e3c541 100644 --- a/tests/e2e/Services/Migrations/MigrationsBase.php +++ b/tests/e2e/Services/Migrations/MigrationsBase.php @@ -1505,18 +1505,20 @@ trait MigrationsBase $this->assertEquals(201, $table['headers']['status-code']); $tableId = $table['body']['$id']; - $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', $headers, [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', $headers, [ 'key' => 'name', 'size' => 256, 'required' => true, ]); + $this->assertEquals(202, $response['headers']['status-code']); - $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', $headers, [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', $headers, [ 'key' => 'age', 'min' => 18, 'max' => 65, 'required' => true, ]); + $this->assertEquals(202, $response['headers']['status-code']); // Create bucket $bucket = $this->client->call(Client::METHOD_POST, '/storage/buckets', $headers, [ @@ -1678,18 +1680,20 @@ trait MigrationsBase $this->assertEquals(201, $table['headers']['status-code']); $tableId = $table['body']['$id']; - $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', $headers, [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/string', $headers, [ 'key' => 'name', 'size' => 256, 'required' => true, ]); + $this->assertEquals(202, $response['headers']['status-code']); - $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', $headers, [ + $response = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/columns/integer', $headers, [ 'key' => 'age', 'min' => 18, 'max' => 65, 'required' => true, ]); + $this->assertEquals(202, $response['headers']['status-code']); // Create bucket $bucket = $this->client->call(Client::METHOD_POST, '/storage/buckets', $headers, [