test stuff

This commit is contained in:
Samir Patel 2021-05-27 13:56:37 -05:00 committed by Samir Patel
parent f946528053
commit 108da005b7
2 changed files with 1 additions and 1 deletions

1
api.go
View file

@ -1051,7 +1051,6 @@ func (api *API) RefreshUsageCache(refresh time.Duration) {
data: make(map[string]NodeUsage),
refreshInterval: refresh,
}
time.Sleep(30 * time.Second)
for {
fmt.Println(1)
api.calculateUsage()

View file

@ -503,6 +503,7 @@ func TestHandler_Endpoints(t *testing.T) {
})
t.Run("UI/usage", func(t *testing.T) {
time.Sleep(time.Second * 10)
w := httptest.NewRecorder()
h.ServeHTTP(w, test.MustNewHTTPRequest("GET", "/ui/usage", nil))
if w.Code != gohttp.StatusOK {