Skip to content

Commit 905ac10

Browse files
authored
Fix mariadb services (#23)
* Fix mariadb services * Fix test * Fix tests
1 parent 73e131a commit 905ac10

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

routes/web.php

+7
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
'mysql',
1515
'pgsql',
1616
'mariadb',
17+
'mariadb10',
18+
'mariadb11',
1719
'redis',
1820
'memcached',
1921
'meilisearch',
@@ -28,6 +30,11 @@
2830

2931
$with = array_unique(explode(',', $request->query('with', 'mysql,redis,meilisearch,mailpit,selenium')));
3032

33+
if(in_array('mariadb', $with)) {
34+
$with = array_diff($with, ['mariadb']);
35+
$with[] = 'mariadb11';
36+
}
37+
3138
try {
3239
Validator::validate(
3340
[

tests/Feature/SailServerTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,22 @@ public function test_it_does_not_accept_empty_with_query_when_present()
8989
$response = $this->get('/example-app?with');
9090

9191
$response->assertStatus(400);
92-
$response->assertSee('Invalid service name. Please provide one or more of the supported services (mysql, pgsql, mariadb, redis, memcached, meilisearch, minio, mailpit, selenium, soketi) or "none".', false);
92+
$response->assertSee('Invalid service name. Please provide one or more of the supported services (mysql, pgsql, mariadb, mariadb10, mariadb11, redis, memcached, meilisearch, typesense, minio, mailpit, selenium, soketi) or "none".', false);
9393
}
9494

9595
public function test_it_does_not_accept_invalid_services()
9696
{
9797
$response = $this->get('/example-app?with=redis,invalid_service_name');
9898

9999
$response->assertStatus(400);
100-
$response->assertSee('Invalid service name. Please provide one or more of the supported services (mysql, pgsql, mariadb, redis, memcached, meilisearch, minio, mailpit, selenium, soketi) or "none".', false);
100+
$response->assertSee('Invalid service name. Please provide one or more of the supported services (mysql, pgsql, mariadb, mariadb10, mariadb11, redis, memcached, meilisearch, typesense, minio, mailpit, selenium, soketi) or "none".', false);
101101
}
102102

103103
public function test_it_does_not_accept_none_with_other_services()
104104
{
105105
$response = $this->get('/example-app?with=none,redis');
106106

107107
$response->assertStatus(400);
108-
$response->assertSee('Invalid service name. Please provide one or more of the supported services (mysql, pgsql, mariadb, redis, memcached, meilisearch, minio, mailpit, selenium, soketi) or "none".', false);
108+
$response->assertSee('Invalid service name. Please provide one or more of the supported services (mysql, pgsql, mariadb, mariadb10, mariadb11, redis, memcached, meilisearch, typesense, minio, mailpit, selenium, soketi) or "none".', false);
109109
}
110110
}

0 commit comments

Comments
 (0)