Skip to content

Commit

Permalink
Revert "Fix mariadb services" (#24)
Browse files Browse the repository at this point in the history
* Revert "Fix mariadb services (#23)"

This reverts commit 905ac10.

* Add typesense to tests again
  • Loading branch information
Jubeki authored Jul 23, 2024
1 parent 905ac10 commit 42fb5e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
7 changes: 0 additions & 7 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
'mysql',
'pgsql',
'mariadb',
'mariadb10',
'mariadb11',
'redis',
'memcached',
'meilisearch',
Expand All @@ -30,11 +28,6 @@

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

if(in_array('mariadb', $with)) {
$with = array_diff($with, ['mariadb']);
$with[] = 'mariadb11';
}

try {
Validator::validate(
[
Expand Down
6 changes: 3 additions & 3 deletions tests/Feature/SailServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,22 @@ public function test_it_does_not_accept_empty_with_query_when_present()
$response = $this->get('/example-app?with');

$response->assertStatus(400);
$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);
$response->assertSee('Invalid service name. Please provide one or more of the supported services (mysql, pgsql, mariadb, redis, memcached, meilisearch, typesense, minio, mailpit, selenium, soketi) or "none".', false);
}

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

$response->assertStatus(400);
$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);
$response->assertSee('Invalid service name. Please provide one or more of the supported services (mysql, pgsql, mariadb, redis, memcached, meilisearch, typesense, minio, mailpit, selenium, soketi) or "none".', false);
}

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

$response->assertStatus(400);
$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);
$response->assertSee('Invalid service name. Please provide one or more of the supported services (mysql, pgsql, mariadb, redis, memcached, meilisearch, typesense, minio, mailpit, selenium, soketi) or "none".', false);
}
}

0 comments on commit 42fb5e4

Please sign in to comment.