Skip to content

Commit 13234a3

Browse files
committed
tests[internal-api-php-client]: Cleanup JobRuntimeResolverTest
1 parent 9d3b404 commit 13234a3

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

tests/JobFactory/JobRuntimeResolverTest.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88
use Keboola\JobQueueInternalClient\Exception\ClientException;
99
use Keboola\JobQueueInternalClient\Exception\ConfigurationDisabledException;
1010
use Keboola\JobQueueInternalClient\JobFactory;
11-
use Keboola\JobQueueInternalClient\JobFactory\JobInterface;
1211
use Keboola\JobQueueInternalClient\JobFactory\JobRuntimeResolver;
1312
use Keboola\JobQueueInternalClient\JobFactory\JobType;
1413
use Keboola\StorageApi\BranchAwareClient;
15-
use Keboola\StorageApi\Client;
1614
use Keboola\StorageApi\ClientException as StorageClientException;
1715
use Keboola\StorageApiBranch\ClientWrapper;
1816
use Keboola\StorageApiBranch\Factory\ClientOptions;
@@ -21,6 +19,8 @@
2119

2220
class JobRuntimeResolverTest extends TestCase
2321
{
22+
private const DEFAULT_BRANCH_ID = '9999';
23+
2424
/** @var array */
2525
private const JOB_DATA = [
2626
'id' => '123456456',
@@ -195,7 +195,7 @@ public function testResolveRuntimeSettingsInJob(): void
195195
'containerType' => 'custom',
196196
'context' => 'wml',
197197
],
198-
'branchId' => 'default',
198+
'branchId' => self::DEFAULT_BRANCH_ID,
199199
'tag' => '1.2.3',
200200
'variableValuesData' => [
201201
'values' => [
@@ -268,7 +268,7 @@ public function testResolveRuntimeSettingsInConfigData(): void
268268
'containerType' => 'mass-produced',
269269
'context' => 'wml',
270270
],
271-
'branchId' => 'default',
271+
'branchId' => self::DEFAULT_BRANCH_ID,
272272
'configData' => [
273273
'variableValuesId' => '123',
274274
'runtime' => [
@@ -362,7 +362,7 @@ public function testResolveRuntimeSettingsInConfiguration(): void
362362
'containerType' => 'stereotyped',
363363
'context' => 'wml',
364364
],
365-
'branchId' => 'default',
365+
'branchId' => self::DEFAULT_BRANCH_ID,
366366
'tag' => '4.5.6',
367367
'parallelism' => '5',
368368
'executor' => 'dind',
@@ -437,7 +437,7 @@ public function testResolveRuntimeSettingsInConfigurationOfTransformations(): vo
437437
'containerType' => null,
438438
'context' => 'wml',
439439
],
440-
'branchId' => 'default',
440+
'branchId' => self::DEFAULT_BRANCH_ID,
441441
'tag' => '4.5.6',
442442
'parallelism' => '5',
443443
'executor' => 'dind',
@@ -514,7 +514,7 @@ public function testResolveRuntimeSettingsPriority(): void
514514
'containerType' => 'stereotyped',
515515
'context' => '123-extractor',
516516
],
517-
'branchId' => 'default',
517+
'branchId' => self::DEFAULT_BRANCH_ID,
518518
'variableValuesId' => '123',
519519
'configData' => [
520520
'variableValuesId' => '456',
@@ -578,7 +578,7 @@ public function testResolveRuntimeSettingsNowhere(): void
578578
'containerType' => null,
579579
'context' => '123-extractor',
580580
],
581-
'branchId' => 'default',
581+
'branchId' => self::DEFAULT_BRANCH_ID,
582582
'tag' => '9.9.9',
583583
'parallelism' => null,
584584
'executor' => 'dind',
@@ -627,7 +627,7 @@ public function testResolveExecutor(
627627
'id' => '123456456',
628628
'runId' => '123456456',
629629
'configId' => '454124290',
630-
'branchId' => 'default',
630+
'branchId' => self::DEFAULT_BRANCH_ID,
631631
'branchType' => 'default',
632632
'componentId' => 'keboola.ex-db-snowflake',
633633
'mode' => 'run',
@@ -800,7 +800,7 @@ public function testResolveNoConfiguration(): void
800800
'containerType' => null,
801801
'context' => '123-extractor',
802802
],
803-
'branchId' => 'default',
803+
'branchId' => self::DEFAULT_BRANCH_ID,
804804
'tag' => '9.9.9',
805805
'parallelism' => null,
806806
'executor' => 'dind',
@@ -844,7 +844,7 @@ public function testResolveEmptyConfiguration(): void
844844
'containerType' => null,
845845
'context' => '123-extractor',
846846
],
847-
'branchId' => 'default',
847+
'branchId' => self::DEFAULT_BRANCH_ID,
848848
'tag' => '9.9.9',
849849
'parallelism' => null,
850850
'executor' => 'dind',
@@ -893,7 +893,7 @@ public function testResolveEmptyConfigurationData(): void
893893
'containerType' => null,
894894
'context' => '123-extractor',
895895
],
896-
'branchId' => 'default',
896+
'branchId' => self::DEFAULT_BRANCH_ID,
897897
'tag' => '9.9.9',
898898
'parallelism' => null,
899899
'executor' => 'dind',
@@ -1145,7 +1145,7 @@ public function testResolveBackend(
11451145
'containerType' => $expectedContainerType,
11461146
'context' => $expectedContext,
11471147
],
1148-
'branchId' => 'default',
1148+
'branchId' => self::DEFAULT_BRANCH_ID,
11491149
'tag' => '1.2.3',
11501150
'variableValuesData' => [
11511151
'values' => [
@@ -1688,7 +1688,7 @@ public function testMergeJobDataBackendWithBackendFromConfig(
16881688
'tokenId' => '456',
16891689
'#tokenString' => 'KBC::ProjectSecure::token',
16901690
'backend' => $expectedBackend,
1691-
'branchId' => 'default',
1691+
'branchId' => self::DEFAULT_BRANCH_ID,
16921692
'tag' => '1.2.3',
16931693
'configData' => $jobData['configData'],
16941694
'parallelism' => null,
@@ -1789,7 +1789,7 @@ private function prepareStorageClientFactoryMock(
17891789
BranchAwareClient $storageClient,
17901790
int $expectedInvocationCount = 1,
17911791
?string $expectedBranchId = 'default',
1792-
string $actualBranchId = 'default',
1792+
string $actualBranchId = self::DEFAULT_BRANCH_ID,
17931793
bool $actualBranchIsDefault = true,
17941794
): StorageClientPlainFactory {
17951795
$clientWrapper = self::createMock(ClientWrapper::class);

0 commit comments

Comments
 (0)