func testServer(t *testing.T, stubs ...test.Http) *httptest.Server { stubs = append(stubs, test.Http{Method: "GET", Path: "/system", Code: 200, Response: System{ Version: "test", }}) return test.Server(t, stubs...) }
func testServer(t *testing.T, stubs ...test.Http) *httptest.Server { stubs = append(stubs, test.Http{Method: "GET", Path: "/system", Code: 200, Response: client.System{ Version: "latest", }}) server := test.Server(t, stubs...) u, _ := url.Parse(server.URL) os.Setenv("CONVOX_HOST", u.Host) os.Setenv("CONVOX_PASSWORD", "test") return server }