Skip to content

Commit

Permalink
Skip for BQ/Exasol
Browse files Browse the repository at this point in the history
  • Loading branch information
jirkasemmler committed Jan 29, 2025
1 parent b786a1c commit aaa6725
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/Backend/CommonPart1/DeleteRowsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function testTableDeleteRowsByFilter(array $filterParams, array $expected
$importFile = __DIR__ . '/../../_data/users.csv';
$tableId = $this->_client->createTableAsync($this->getTestBucketId(self::STAGE_IN), 'users', new CsvFile($importFile));
$tableInfo = $this->_client->getTable($tableId);
if ($this->isBigqueryWithNewDeleteRows($tableInfo['bucket']['backend'], $filterParams)) {
if ($this->isBigqueryOrExasolWithNewDeleteRows($tableInfo['bucket']['backend'], $filterParams)) {
$this->markTestSkipped('BQ does not new params of valuesBy* yet');
}

Expand Down Expand Up @@ -68,7 +68,7 @@ public function testTableDeleteRowsByFilterAsQuery(array $filterParams, array $e
$importFile = __DIR__ . '/../../_data/users.csv';
$tableId = $this->_client->createTableAsync($this->getTestBucketId(self::STAGE_IN), 'users', new CsvFile($importFile));
$tableInfo = $this->_client->getTable($tableId);
if ($this->isBigqueryWithNewDeleteRows($tableInfo['bucket']['backend'], $filterParams)) {
if ($this->isBigqueryOrExasolWithNewDeleteRows($tableInfo['bucket']['backend'], $filterParams)) {
$this->markTestSkipped('BQ does not new params of valuesBy* yet');
}
$this->_client->deleteTableRowsAsQuery($tableId, $filterParams);
Expand All @@ -82,7 +82,7 @@ public function testTableDeleteRowsByFilterAsQuery(array $filterParams, array $e
}

// because BQ/exa does not support valuesByTableInStorage / valuesByTableInWorkspace yet/. Tmp fix
private function isBigqueryWithNewDeleteRows(string $backendName, array $filterParams): bool
private function isBigqueryOrExasolWithNewDeleteRows(string $backendName, array $filterParams): bool
{
return in_array($backendName, ['bigquery', 'exasol']) &&
array_key_exists('whereFilters', $filterParams) &&
Expand Down Expand Up @@ -372,6 +372,8 @@ public function tableDeleteRowsByFiltersData(): array

public function testDeleteByValuesInWorkspaceWithInvalidData(): void
{
$this->skipTestForBackend(['bigquery', 'exasol'], 'Not supported in BQ/Exasol yet');

$importFile = __DIR__ . '/../../_data/users.csv';
$tableId = $this->_client->createTableAsync($this->getTestBucketId(self::STAGE_IN), 'users', new CsvFile($importFile));

Expand All @@ -383,7 +385,6 @@ public function testDeleteByValuesInWorkspaceWithInvalidData(): void

$runId = $this->_client->generateRunId();
$this->_client->setRunId($runId);
$this->_client->setRunId($runId);

$workspace = $workspaces->createWorkspace();
$backend = WorkspaceBackendFactory::createWorkspaceBackend($workspace);
Expand Down Expand Up @@ -462,6 +463,7 @@ public function testDeleteByValuesInWorkspaceWithInvalidData(): void
public function testDeleteByValuesInWorkspaceWithValidData(): void
{
$importFile = __DIR__ . '/../../_data/users.csv';
$this->skipTestForBackend(['bigquery', 'exasol'], 'Not supported in BQ/Exasol yet');
$tableId = $this->_client->createTableAsync($this->getTestBucketId(self::STAGE_IN), 'users', new CsvFile($importFile));

$workspaces = new Workspaces($this->_client);
Expand All @@ -472,7 +474,6 @@ public function testDeleteByValuesInWorkspaceWithValidData(): void

$runId = $this->_client->generateRunId();
$this->_client->setRunId($runId);
$this->_client->setRunId($runId);

$workspace = $workspaces->createWorkspace();
$backend = WorkspaceBackendFactory::createWorkspaceBackend($workspace);
Expand Down

0 comments on commit aaa6725

Please sign in to comment.