Skip to content

pkg/network/commands_tests broken for non-default dev machines #2108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jandubois opened this issue Jan 2, 2024 · 0 comments
Open

pkg/network/commands_tests broken for non-default dev machines #2108

jandubois opened this issue Jan 2, 2024 · 0 comments

Comments

@jandubois
Copy link
Member

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.

cmd := config.StartCmd("shared", SocketVMNet)
assert.Equal(t, cmd, "/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"))

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant