Skip to content
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

Golang :TestNearest issues with floaterm strategy #791

Open
johnmaguire opened this issue Mar 22, 2024 · 1 comment
Open

Golang :TestNearest issues with floaterm strategy #791

johnmaguire opened this issue Mar 22, 2024 · 1 comment

Comments

@johnmaguire
Copy link

I have a Go test suite e2e with a main_test.go and a test case that looks like this:

	t.Run("fail overrides", func(t *testing.T) {
		t.Parallel()

		_, _, email := createUser(t)
		token := createAuthToken(t, email)
		networkID := createNetwork(t, token)

		staticAddress := "111.111.111.111:4242"
		listenPort := 4242

		nodeName := "test node " + randString(16) // unique constraint
		overrides := []m{
			{"key": "stats.type", "value": "prometheus"},
			{"key": "listen.batch", "value": float64(64)},
			{"key": "tun.dev", "value": "def13"},
			{"key": "tun.dev", "value": "def13"},
		}
		resp, _ := authPost(t, token, "/v1/hosts", m{"networkID": networkID, "name": nodeName, "listenPort": listenPort, "staticAddresses": []string{staticAddress}, "configOverrides": overrides})
		require.Equal(t, http.StatusOK, resp.StatusCode)
	})

If I leave test#strategy unset, :TestNearest correctly runs the following: go test -run 'TestBillingHost/fail_overrides$' ./e2e

However, if I add test#strategy = "floaterm", floaterm opens with the following message:

ok      github.com/DefinedNet/api/e2e   (cached) [no tests to run]

The test is not run.

@johnmaguire johnmaguire changed the title Golang :TestNearest issues with non-default strategy Golang :TestNearest issues with floaterm strategy Mar 22, 2024
@codeinabox
Copy link
Collaborator

Does floaterm have a different working directory?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants