lima
lima copied to clipboard
pkg/network/commands_tests broken for non-default dev machines
In #1220 the default config has become dependent on the local machine configuration, but the tests still use hardcoded default values for expected paths etc, e.g. https://github.com/lima-vm/lima/blob/f3dc6ed97aa8f69821ecbe1c2b29988c97e67eb7/pkg/networks/commands_test.go#L106-L108
This fails unless the local machine matches the hard-coded config, e.g.
--- FAIL: TestStartCmd (0.00s)
--- FAIL: TestStartCmd/socket_vmnet (0.00s)
commands_test.go:107: assertion failed: /usr/local/Cellar/socket_vmnet/1.1.3/bin/socket_vmnet --pidfile=/private/var/run/lima/shared_socket_vmnet.pid --socket-group=everyone --vmnet-mode=shared --vmnet-gateway=192.168.105.1 --vmnet-dhcp-end=192.168.105.254 --vmnet-mask=255.255.255.0 /private/var/run/lima/socket_vmnet.shared (cmd string) != /opt/socket_vmnet/bin/socket_vmnet --pidfile=/private/var/run/lima/shared_socket_vmnet.pid --socket-group=everyone --vmnet-mode=shared --vmnet-gateway=192.168.105.1 --vmnet-dhcp-end=192.168.105.254 --vmnet-mask=255.255.255.0 /private/var/run/lima/socket_vmnet.shared ("/opt/socket_vmnet/bin/socket_vmnet --pidfile=" + filepath.Join(varRunDir, "shared_socket_vmnet.pid") + " --socket-group=everyone --vmnet-mode=shared " + "--vmnet-gateway=192.168.105.1 --vmnet-dhcp-end=192.168.105.254 --vmnet-mask=255.255.255.0 " + filepath.Join(varRunDir, "socket_vmnet.shared") string)