[sales] Test sales rest api
This commit is contained in:
parent
cc9a4e2af6
commit
45c55ab2a8
|
@ -331,7 +331,7 @@ proc initRestApi*(node: DaggerNodeRef, conf: DaggerConf): RestRouter =
|
|||
"\nRoot Dir: " & $conf.dataDir)
|
||||
|
||||
router.api(
|
||||
MethodPost,
|
||||
MethodGet,
|
||||
"/api/dagger/v1/sales/availability") do (
|
||||
size: Option[uint64],
|
||||
duration: Option[uint64],
|
||||
|
|
|
@ -38,3 +38,8 @@ suite "Integration tests":
|
|||
let info1 = client.get("http://localhost:8080/api/dagger/v1/info").body
|
||||
let info2 = client.get("http://localhost:8081/api/dagger/v1/info").body
|
||||
check info1 != info2
|
||||
|
||||
test "node handles new storage availability":
|
||||
let baseurl = "http://localhost:8080/api/dagger/v1"
|
||||
let url = baseurl & "/sales/availability?size=1&duration=1&minPrice=0x2A"
|
||||
check client.get(url).status == "200 OK"
|
||||
|
|
Loading…
Reference in New Issue