mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-03 05:19:37 +00:00
fix: boolean docker options
This commit is contained in:
1 parent
82b0667277
commit
364a6aa3a2
2 files changed
+32
-5
No files matched your search
@@ -1,9 +1,31 @@
|
||||
<?php
|
||||
|
||||
it('ConvertDockerTunCommand', function () {
|
||||
it('ConvertCapAdd', function () {
|
||||
$input = '--cap-add=NET_ADMIN --cap-add=NET_RAW --cap-add SYS_ADMIN';
|
||||
$output = convert_docker_run_to_compose($input);
|
||||
expect($output)->toBe([
|
||||
'cap_add' => ['NET_ADMIN', 'NET_RAW', 'SYS_ADMIN'],
|
||||
])->ray();
|
||||
});
|
||||
|
||||
it('ConvertPrivilegedAndInit', function () {
|
||||
$input = '---privileged --init';
|
||||
$output = convert_docker_run_to_compose($input);
|
||||
expect($output)->toBe([
|
||||
'privileged' => true,
|
||||
'init' => true,
|
||||
])->ray();
|
||||
});
|
||||
|
||||
it('ConvertUlimit', function () {
|
||||
$input = '--ulimit nofile=262144:262144';
|
||||
$output = convert_docker_run_to_compose($input);
|
||||
expect($output)->toBe([
|
||||
'ulimits' => [
|
||||
'nofile' => [
|
||||
'soft' => '262144',
|
||||
'hard' => '262144',
|
||||
],
|
||||
],
|
||||
])->ray();
|
||||
});
|
||||
Reference in new issue
Block a user