databag/net/server/main_test.go

22 lines
387 B
Go
Raw Normal View History

2022-01-12 07:04:27 +00:00
package main
2022-01-11 17:36:16 +00:00
2022-01-12 07:04:27 +00:00
import (
"testing"
"net/http/httptest"
app "databag/internal"
store "databag/internal/store"
)
2022-01-11 17:36:16 +00:00
2022-01-12 07:04:27 +00:00
func TestClaim(t *testing.T) {
store.SetPath("file::memory:?cache=shared");
r := httptest.NewRequest("GET", "/claimable", nil)
w := httptest.NewRecorder()
app.GetNodeClaimable(w, r);
if w.Code != 200 {
t.Errorf("server not initially claimable");
}
2022-01-11 17:36:16 +00:00
}