Skip to content

Commit 9ac6b5e

Browse files
MC-38424: Support for Remote Storage
1 parent 3baab93 commit 9ac6b5e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Step/Deploy/RemoteStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function execute(): void
9393
];
9494

9595
if ($prefix = $this->config->getPrefix()) {
96-
$options['--remote-storage-prefix='] = $prefix;
96+
$options[] = '--remote-storage-prefix=' . $prefix;
9797
}
9898

9999
if (isset($config['key'], $config['secret'])) {

src/Test/Unit/Step/Deploy/RemoteStorageTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,19 +134,21 @@ public function testExecuteWithKeysAndPrefix(): void
134134
->willReturn(true);
135135
$this->configMock->method('getDriver')
136136
->willReturn('adapter');
137+
$this->configMock->method('getPrefix')
138+
->willReturn('test_prefix');
137139
$this->configMock->method('getConfig')
138140
->willReturn([
139141
'bucket' => 'test_bucket',
140142
'region' => 'test_region',
141143
'key' => 'test_key',
142144
'secret' => 'test_secret',
143-
'prefix' => 'test_prefix'
144145
]);
145146
$this->magentoShellMock->expects(self::once())
146147
->method('execute')
147148
->with(
148149
'setup:config:set --remote-storage-driver=adapter'
149150
. ' --remote-storage-bucket=test_bucket --remote-storage-region=test_region'
151+
. ' --remote-storage-prefix=test_prefix'
150152
. ' --remote-storage-access-key=test_key --remote-storage-secret-key=test_secret -n'
151153
);
152154
$this->loggerMock->expects(self::once())
@@ -193,8 +195,7 @@ public function testExecuteWithException(): void
193195
'bucket' => 'test_bucket',
194196
'region' => 'test_region',
195197
'key' => 'test_key',
196-
'secret' => 'test_secret',
197-
'prefix' => 'test_prefix'
198+
'secret' => 'test_secret'
198199
]);
199200
$this->magentoShellMock->expects(self::once())
200201
->method('execute')
@@ -223,7 +224,6 @@ public function testExecuteWithMissingOptions(): void
223224
->willReturn([
224225
'key' => 'test_key',
225226
'secret' => 'test_secret',
226-
'prefix' => 'test_prefix'
227227
]);
228228

229229
$this->step->execute();

0 commit comments

Comments
 (0)