Skip to content

Golang :TestNearest issues with floaterm strategy #791

@johnmaguire

Description

@johnmaguire

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions