mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
feat(hostinger): add cloud provider integration (#11176)
This commit is contained in:
@@ -245,6 +245,30 @@ BASH);
|
||||
->not->toContain('--profile testing-host up');
|
||||
});
|
||||
|
||||
it('runs the host qemu command with a clean local environment', function () {
|
||||
if (! function_exists('posix_geteuid') || posix_geteuid() !== 0 || ! file_exists('/dev/kvm') || filetype('/dev/kvm') !== 'char' || ! is_readable('/dev/kvm') || ! is_writable('/dev/kvm')) {
|
||||
$this->markTestSkipped('KVM and root access are required for this launcher branch.');
|
||||
}
|
||||
|
||||
file_put_contents($this->devRoot.'/bin/php', <<<'BASH'
|
||||
#!/usr/bin/env bash
|
||||
[[ "$APP_ENV" == local && "$APP_CONFIG_CACHE" == */bootstrap/cache/dev-qemu-*.php ]] || {
|
||||
echo 'This command may only run in development mode.' >&2
|
||||
exit 1
|
||||
}
|
||||
printf 'php %s ENV=%s CACHE=%s\n' "$*" "$APP_ENV" "$APP_CONFIG_CACHE" >> "$DEV_TEST_LOG"
|
||||
BASH);
|
||||
|
||||
$process = runDevScript('wt', ['start', 'ubuntu-root'], [
|
||||
'COOLIFY_DEV_SERVER_BACKEND' => 'auto',
|
||||
'APP_ENV' => 'production',
|
||||
'APP_CONFIG_CACHE' => '/tmp/stale-config.php',
|
||||
]);
|
||||
|
||||
expect($process->isSuccessful())->toBeTrue($process->getErrorOutput())
|
||||
->and(devScriptLog())->toContain('php artisan dev:qemu ubuntu-root --as-localhost ENV=local CACHE=');
|
||||
});
|
||||
|
||||
it('starts a lima vm as localhost on macos and seeds its forwarded ssh port', function () {
|
||||
($this->fakeLima)();
|
||||
runDevScript('main', ['start']);
|
||||
|
||||
Reference in New Issue
Block a user