diff --git a/tests/Feature/ProductionSeederTest.php b/tests/Feature/ProductionSeederTest.php deleted file mode 100644 index 03da9f9529..0000000000 --- a/tests/Feature/ProductionSeederTest.php +++ /dev/null @@ -1,68 +0,0 @@ - 'log', - 'constants.coolify.is_windows_docker_desktop' => true, - ]); - Queue::fake(); - StartProxy::shouldRun()->andReturn('OK'); - - Server::creating(function (Server $server) { - if ((int) $server->getKey() === 0) { - expect(Team::find(0))->not->toBeNull(); - } - }); - - Server::created(function (Server $server) { - SslCertificate::create([ - 'server_id' => $server->id, - 'common_name' => 'Coolify CA Certificate', - 'ssl_certificate' => 'certificate', - 'ssl_private_key' => 'private-key', - 'valid_until' => now()->addYear(), - 'is_ca_certificate' => true, - ]); - }); - - $this->seed(ProductionSeeder::class); - - $rootTeam = Team::find(0); - $localhostServer = Server::find(0); - - expect($rootTeam)->not->toBeNull() - ->and($localhostServer)->not->toBeNull() - ->and($localhostServer->team_id)->toBe(0); - - expect(SharedEnvironmentVariable::query() - ->where('type', 'server') - ->where('server_id', 0) - ->where('team_id', 0) - ->pluck('key') - ->all() - )->toContain('COOLIFY_SERVER_UUID', 'COOLIFY_SERVER_NAME'); - - instanceSettings()->update(['is_registration_enabled' => true]); - - $rootUser = app(CreateNewUser::class)->create([ - 'name' => 'Root User', - 'email' => 'root@example.com', - 'password' => 'Password123!', - 'password_confirmation' => 'Password123!', - ]); - - expect(Team::whereKey(0)->count())->toBe(1) - ->and($rootUser->teams()->where('team_id', 0)->exists())->toBeTrue(); -});