(w http.ResponseWriter, token, apiURL string)
| 54 | } |
| 55 | |
| 56 | func writeSession(w http.ResponseWriter, token, apiURL string) { |
| 57 | w.Header().Set("Content-Type", "application/json") |
| 58 | w.WriteHeader(http.StatusCreated) |
| 59 | _ = json.NewEncoder(w).Encode(map[string]any{ |
| 60 | "token": token, |
| 61 | "api_url": apiURL, |
| 62 | "expires_in_seconds": 604800, |
| 63 | }) |
| 64 | } |
| 65 | |
| 66 | func fakeCloud(t *testing.T, tenants func(w http.ResponseWriter, r *http.Request), session func(w http.ResponseWriter, r *http.Request)) *httptest.Server { |
| 67 | t.Helper() |
no test coverage detected