This commit is contained in:
Joao Patricio 2023-03-30 09:04:44 +01:00
parent 037861321d
commit e2f527fc7b
2 changed files with 4 additions and 8 deletions

View File

@ -34,10 +34,6 @@ function remoteProcess(
])(); ])();
} }
function checkServer(string $destination){ function checkServer(string $destination){
// Temp early return. Just to make GHAction pass
return;
// @TODO: Use UUID instead of name // @TODO: Use UUID instead of name
$found_server = Server::where('name', $destination)->first(); $found_server = Server::where('name', $destination)->first();
if (!$found_server) { if (!$found_server) {
@ -46,10 +42,6 @@ function checkServer(string $destination){
return $found_server; return $found_server;
} }
function checkTeam(string $team_id){ function checkTeam(string $team_id){
// Temp early return. Just to make GHAction pass
return;
$found_team = auth()->user()->teams->pluck('id')->contains($team_id); $found_team = auth()->user()->teams->pluck('id')->contains($team_id);
if (!$found_team) { if (!$found_team) {
throw new \RuntimeException('You do not have access to this server.'); throw new \RuntimeException('You do not have access to this server.');

View File

@ -1,9 +1,13 @@
<?php <?php
use App\Models\User;
use Tests\Support\Output; use Tests\Support\Output;
it('starts a docker container correctly', function () { it('starts a docker container correctly', function () {
test()->actingAs(User::factory()->create());
$coolifyNamePrefix = 'coolify_test_'; $coolifyNamePrefix = 'coolify_test_';
$format = '{"ID":"{{ .ID }}", "Image": "{{ .Image }}", "Names":"{{ .Names }}"}'; $format = '{"ID":"{{ .ID }}", "Image": "{{ .Image }}", "Names":"{{ .Names }}"}';
$areThereCoolifyTestContainers = "docker ps --filter=\"name={$coolifyNamePrefix}*\" --format '{$format}' "; $areThereCoolifyTestContainers = "docker ps --filter=\"name={$coolifyNamePrefix}*\" --format '{$format}' ";