Skip to content

Commit 4e150b1

Browse files
committed
MCP-903: Fix default connection = db setting after Magento installation
- Update unit test; - Remove db connection as a default for web api tests queues;
1 parent 21aa88d commit 4e150b1

File tree

3 files changed

+39
-18
lines changed

3 files changed

+39
-18
lines changed

dev/tests/api-functional/config/post-install-setup-command-config.php.dist

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66

77
// List of bin/magento setup CLI commands to run after setup:install
88
return [
9+
/*
910
[
1011
'command' => 'setup:config:set',
1112
'config' => [
12-
'--queue-default-connection' => 'db'
13-
/*
1413
'--remote-storage-driver' => 'aws-s3',
1514
'--remote-storage-bucket' => 'myBucket',
16-
'--remote-storage-region' => 'us-east-1',
17-
*/
15+
'--remote-storage-region' => 'us-east-1'
1816
]
1917
]
18+
*/
2019
];

setup/src/Magento/Setup/Model/ConfigOptionsList/Lock.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,70 +26,70 @@ class Lock implements ConfigOptionsListInterface
2626
*
2727
* @const string
2828
*/
29-
const INPUT_KEY_LOCK_PROVIDER = 'lock-provider';
29+
public const INPUT_KEY_LOCK_PROVIDER = 'lock-provider';
3030

3131
/**
3232
* The name of an option to set DB prefix
3333
*
3434
* @const string
3535
*/
36-
const INPUT_KEY_LOCK_DB_PREFIX = 'lock-db-prefix';
36+
public const INPUT_KEY_LOCK_DB_PREFIX = 'lock-db-prefix';
3737

3838
/**
3939
* The name of an option to set Zookeeper host
4040
*
4141
* @const string
4242
*/
43-
const INPUT_KEY_LOCK_ZOOKEEPER_HOST = 'lock-zookeeper-host';
43+
public const INPUT_KEY_LOCK_ZOOKEEPER_HOST = 'lock-zookeeper-host';
4444

4545
/**
4646
* The name of an option to set Zookeeper path
4747
*
4848
* @const string
4949
*/
50-
const INPUT_KEY_LOCK_ZOOKEEPER_PATH = 'lock-zookeeper-path';
50+
public const INPUT_KEY_LOCK_ZOOKEEPER_PATH = 'lock-zookeeper-path';
5151

5252
/**
5353
* The name of an option to set File path
5454
*
5555
* @const string
5656
*/
57-
const INPUT_KEY_LOCK_FILE_PATH = 'lock-file-path';
57+
public const INPUT_KEY_LOCK_FILE_PATH = 'lock-file-path';
5858

5959
/**
6060
* The configuration path to save lock provider
6161
*
6262
* @const string
6363
*/
64-
const CONFIG_PATH_LOCK_PROVIDER = 'lock/provider';
64+
public const CONFIG_PATH_LOCK_PROVIDER = 'lock/provider';
6565

6666
/**
6767
* The configuration path to save DB prefix
6868
*
6969
* @const string
7070
*/
71-
const CONFIG_PATH_LOCK_DB_PREFIX = 'lock/config/prefix';
71+
public const CONFIG_PATH_LOCK_DB_PREFIX = 'lock/config/prefix';
7272

7373
/**
7474
* The configuration path to save Zookeeper host
7575
*
7676
* @const string
7777
*/
78-
const CONFIG_PATH_LOCK_ZOOKEEPER_HOST = 'lock/config/host';
78+
public const CONFIG_PATH_LOCK_ZOOKEEPER_HOST = 'lock/config/host';
7979

8080
/**
8181
* The configuration path to save Zookeeper path
8282
*
8383
* @const string
8484
*/
85-
const CONFIG_PATH_LOCK_ZOOKEEPER_PATH = 'lock/config/path';
85+
public const CONFIG_PATH_LOCK_ZOOKEEPER_PATH = 'lock/config/path';
8686

8787
/**
8888
* The configuration path to save locks directory path
8989
*
9090
* @const string
9191
*/
92-
const CONFIG_PATH_LOCK_FILE_PATH = 'lock/config/path';
92+
public const CONFIG_PATH_LOCK_FILE_PATH = 'lock/config/path';
9393

9494
/**
9595
* The list of lock providers

setup/src/Magento/Setup/Test/Unit/Model/ConfigOptionsList/LockTest.php

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,7 @@ public function createConfigDataProvider(): array
9393
'options' => [],
9494
'expectedResult' => [
9595
'lock' => [
96-
'provider' => LockBackendFactory::LOCK_DB,
97-
'config' => [
98-
'prefix' => null,
99-
],
96+
'provider' => LockBackendFactory::LOCK_DB
10097
],
10198
],
10299
],
@@ -168,6 +165,31 @@ public function createConfigDataProvider(): array
168165
],
169166
],
170167
],
168+
'Check specific db lock prefix null options' => [
169+
'options' => [
170+
LockConfigOptionsList::INPUT_KEY_LOCK_PROVIDER => LockBackendFactory::LOCK_DB,
171+
LockConfigOptionsList::INPUT_KEY_LOCK_DB_PREFIX => null
172+
],
173+
'expectedResult' => [
174+
'lock' => [
175+
'provider' => LockBackendFactory::LOCK_DB
176+
],
177+
],
178+
],
179+
'Check specific db lock prefix empty options' => [
180+
'options' => [
181+
LockConfigOptionsList::INPUT_KEY_LOCK_PROVIDER => LockBackendFactory::LOCK_DB,
182+
LockConfigOptionsList::INPUT_KEY_LOCK_DB_PREFIX => ''
183+
],
184+
'expectedResult' => [
185+
'lock' => [
186+
'provider' => LockBackendFactory::LOCK_DB,
187+
'config' => [
188+
'prefix' => '',
189+
],
190+
],
191+
],
192+
],
171193
];
172194
}
173195

0 commit comments

Comments
 (0)