To use this snippet:
- Add the following to the package you would like to be able to test remotely:
func TestMain(m *testing.M) { testutil.MainWithRemoteExecutionSupport(m) }
- Run your tests as
GO_TEST_REMOTE_EXECUTION_SSH_HOST=<SSH host> go test ./<path to your package>
.
In case your hosts use different glibc versions and you get an error executing a binary, add CGO_ENABLED=0
to the command above.