Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedvaziry committed Mar 27, 2024
1 parent b6179d6 commit c66c508
Show file tree
Hide file tree
Showing 22 changed files with 29 additions and 8 deletions.
4 changes: 3 additions & 1 deletion app/Enums/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ final class Database

const MYSQL80 = 'mysql80';

const MARIADB = 'mariadb';
const MARIADB103 = 'mariadb103';

const MARIADB104 = 'mariadb104';

const POSTGRESQL12 = 'postgresql12';

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@include("services.partials.unit-actions")
1 change: 1 addition & 0 deletions resources/views/services/partials/actions/mysql.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@include("services.partials.unit-actions")
4 changes: 2 additions & 2 deletions tests/Feature/ApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function test_visit_application()
'site' => $this->site,
])
)
->assertOk()
->assertSuccessful()
->assertSee($this->site->domain);
}

Expand Down Expand Up @@ -88,7 +88,7 @@ public function test_deploy(): void
'server' => $this->server,
'site' => $this->site,
]))
->assertOk()
->assertSuccessful()
->assertSee('test commit message');

$deployment = $this->site->deployments()->first();
Expand Down
1 change: 1 addition & 0 deletions tests/Feature/ConsoleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public function test_see_console(): void
$this->actingAs($this->user);

$this->get(route('servers.console', $this->server))
->assertSuccessful()
->assertSeeText('Headless Console');
}

Expand Down
1 change: 1 addition & 0 deletions tests/Feature/CronjobTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public function test_see_cronjobs_list()
]);

$this->get(route('servers.cronjobs', $this->server))
->assertSuccessful()
->assertSeeText($cronjob->frequencyLabel());
}

Expand Down
1 change: 1 addition & 0 deletions tests/Feature/DatabaseBackupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public function test_see_backups_list(): void
]);

$this->get(route('servers.databases.backups', [$this->server, $backup]))
->assertSuccessful()
->assertSee($backup->database->name);
}

Expand Down
1 change: 1 addition & 0 deletions tests/Feature/DatabaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public function test_see_databases_list(): void
]);

$this->get(route('servers.databases', $this->server))
->assertSuccessful()
->assertSee($database->name);
}

Expand Down
1 change: 1 addition & 0 deletions tests/Feature/DatabaseUserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public function test_see_database_users_list(): void
]);

$this->get(route('servers.databases', $this->server))
->assertSuccessful()
->assertSee($databaseUser->username);
}

Expand Down
1 change: 1 addition & 0 deletions tests/Feature/FirewallTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function test_see_firewall_rules(): void
]);

$this->get(route('servers.firewall', $this->server))
->assertSuccessful()
->assertSee($rule->source)
->assertSee($rule->port);
}
Expand Down
1 change: 1 addition & 0 deletions tests/Feature/LogsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function test_see_logs()
]);

$this->get(route('servers.logs', $this->server))
->assertSuccessful()
->assertSeeText($log->type);
}
}
1 change: 1 addition & 0 deletions tests/Feature/NotificationChannelsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ public function test_see_channels_list(): void
$channel = \App\Models\NotificationChannel::factory()->create();

$this->get(route('notification-channels'))
->assertSuccessful()
->assertSee($channel->provider);
}

Expand Down
1 change: 1 addition & 0 deletions tests/Feature/ProfileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public function test_profile_page_is_displayed(): void

$this
->get(route('profile'))
->assertSuccessful()
->assertSee('Profile Information')
->assertSee('Update Password')
->assertSee('Two Factor Authentication');
Expand Down
1 change: 1 addition & 0 deletions tests/Feature/ProjectsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function test_see_projects_list(): void
]);

$this->get(route('projects'))
->assertSuccessful()
->assertSee($project->name);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/QueuesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function test_see_queues()
'site' => $this->site,
])
)
->assertOk()
->assertSuccessful()
->assertSee($queue->command);
}

Expand Down
1 change: 1 addition & 0 deletions tests/Feature/ServerKeysTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public function test_see_server_keys()
]);

$this->get(route('servers.ssh-keys', $this->server))
->assertSuccessful()
->assertSeeText('My first key');
}

Expand Down
1 change: 1 addition & 0 deletions tests/Feature/ServerProvidersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public function test_see_providers_list(): void
]);

$this->get(route('server-providers'))
->assertSuccessful()
->assertSee($provider->profile);
}

Expand Down
3 changes: 3 additions & 0 deletions tests/Feature/ServicesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public function test_see_services_list(): void
$this->actingAs($this->user);

$this->get(route('servers.services', $this->server))
->assertSuccessful()
->assertSee('mysql')
->assertSee('nginx')
->assertSee('php')
->assertSee('supervisor')
Expand Down Expand Up @@ -242,6 +244,7 @@ public static function data(): array
['redis'],
['ufw'],
['php'],
['mysql'],
];
}
}
4 changes: 2 additions & 2 deletions tests/Feature/SitesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function test_see_sites_list(): void
$this->get(route('servers.sites', [
'server' => $this->server,
]))
->assertOk()
->assertSuccessful()
->assertSee($site->domain);
}

Expand Down Expand Up @@ -178,7 +178,7 @@ public function test_see_logs(): void
'server' => $this->server,
'site' => $this->site,
]))
->assertOk()
->assertSuccessful()
->assertSee('Logs');
}
}
1 change: 1 addition & 0 deletions tests/Feature/SshKeysTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function test_get_public_keys_list(): void
]);

$this->get(route('ssh-keys'))
->assertSuccessful()
->assertSee($key->name);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/Feature/SslTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function test_see_ssls_list()
'server' => $this->server,
'site' => $this->site,
]))
->assertOk()
->assertSuccessful()
->assertSee($ssl->type);
}

Expand All @@ -37,7 +37,7 @@ public function test_see_ssls_list_with_no_ssls()
'server' => $this->server,
'site' => $this->site,
]))
->assertOk()
->assertSuccessful()
->assertSeeText(__("You don't have any SSL certificates yet!"));
}

Expand Down
1 change: 1 addition & 0 deletions tests/Feature/StorageProvidersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function test_see_providers_list(): void
]);

$this->get(route('storage-providers'))
->assertSuccessful()
->assertSee($provider->profile);
}

Expand Down

0 comments on commit c66c508

Please sign in to comment.