浏览文件
commands_darwin_test.go
26 行 · 551 B历史下载| 1 | // SPDX-FileCopyrightText: Copyright The Lima Authors |
| 2 | // SPDX-License-Identifier: Apache-2.0 |
| 3 | |
| 4 | package networks |
| 5 | |
| 6 | import ( |
| 7 | "testing" |
| 8 | |
| 9 | "gotest.tools/v3/assert" |
| 10 | ) |
| 11 | |
| 12 | func TestSock(t *testing.T) { |
| 13 | config, err := DefaultConfig() |
| 14 | assert.NilError(t, err) |
| 15 | |
| 16 | sock := config.Sock("foo") |
| 17 | assert.Equal(t, sock, "/private/var/run/lima/socket_vmnet.foo") |
| 18 | } |
| 19 | |
| 20 | func TestPIDFile(t *testing.T) { |
| 21 | config, err := DefaultConfig() |
| 22 | assert.NilError(t, err) |
| 23 | |
| 24 | pidFile := config.PIDFile("name", "daemon") |
| 25 | assert.Equal(t, pidFile, "/private/var/run/lima/name_daemon.pid") |
| 26 | } |

