Skip to content

Commit c429ce3

Browse files
committed
B2B-1776: Update Integration Test Framework to Support Integration Tests Builds to Work Against Actual Aurora Db
1 parent 2a90adf commit c429ce3

File tree

5 files changed

+24
-20
lines changed

5 files changed

+24
-20
lines changed

dev/tests/integration/etc/post-install-setup-command-config.php.dist

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// List of bin/magento CLI commands to run after setup:install
7+
// List of bin/magento setup CLI commands to run after setup:install
88
return [
99
/*
1010
[
11-
'command' => 'setup:db-schema:add-slave',
12-
'host' => 'localhost',
13-
'dbname' => 'db-replica-dbname',
14-
'username' => 'db-replica-username',
15-
'password' => 'db-replica-password',
11+
'command' => 'setup:config:set',
12+
'config' => [
13+
'--remote-storage-driver' => 'aws-s3',
14+
'--remote-storage-bucket' => 'myBucket',
15+
'--remote-storage-region' => 'us-east-1',
16+
]
1617
]
1718
*/
1819
];

dev/tests/integration/framework/Magento/TestFramework/Application.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ public function install($cleanup)
568568
}
569569

570570
$command = $postInstallSetupCommand['command'];
571-
$argumentsAndOptions = array_diff_key($postInstallSetupCommand, array_flip(['command']));
571+
$argumentsAndOptions = $postInstallSetupCommand['config'];
572572

573573
$argumentsAndOptionsPlaceholders = [];
574574

@@ -578,7 +578,7 @@ public function install($cleanup)
578578
if ($isArgument) {
579579
$argumentsAndOptionsPlaceholders[] = '%s';
580580
} else {
581-
$argumentsAndOptionsPlaceholders[] = "--$key=%s";
581+
$argumentsAndOptionsPlaceholders[] = "$key=%s";
582582
}
583583
}
584584

dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public function installDataProvider()
231231
[
232232
$installShellCommandExpectation,
233233
[
234-
PHP_BINARY . ' -f %s %s -vvv %s %s --option1=%s --option2=%s --magento-init-params=%s',
234+
PHP_BINARY . ' -f %s %s -vvv %s %s --option1=%s -option2=%s --magento-init-params=%s',
235235
[
236236
BP . '/bin/magento',
237237
'fake:command',

dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/_files/post-install-setup-command-config1.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
return [
88
[
99
'command' => 'setup:db-schema:add-slave',
10-
'host' => '/tmp/mysql.sock',
11-
'dbname' => 'magento_replica',
12-
'username' => 'root',
13-
'password' => 'secret',
10+
'config' => [
11+
'--host' => '/tmp/mysql.sock',
12+
'--dbname' => 'magento_replica',
13+
'--username' => 'root',
14+
'--password' => 'secret',
15+
]
1416
],
1517
];

dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/_files/post-install-setup-command-config3.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
return [
88
[
99
'command' => 'fake:command',
10+
'config' => [
11+
// arguments
12+
'foo',
13+
'bar',
1014

11-
// arguments
12-
'foo',
13-
'bar',
14-
15-
// options
16-
'option1' => 'baz',
17-
'option2' => 'qux',
15+
// options
16+
'--option1' => 'baz',
17+
'-option2' => 'qux',
18+
]
1819
],
1920
];

0 commit comments

Comments
 (0)