@@ -30,6 +30,7 @@ dev-web:
|
||||
test: ## Smoke-test the RPC endpoints
|
||||
@go build -o bin/hub-api ./server
|
||||
@./bin/hub-api & sleep 1; \
|
||||
curl -sf -X POST localhost:8080/homelab.v1.HomelabService/ListSections -H 'Content-Type: application/json' -d '{}' | grep -q '"cpu"' || exit 1; \
|
||||
curl -sf -X POST localhost:8080/homelab.v1.HomelabService/ListContent -H 'Content-Type: application/json' -d '{}' | grep -q '"cpu"' || exit 1; \
|
||||
curl -sf -X POST localhost:8080/homelab.v1.HomelabService/ListDocs -H 'Content-Type: application/json' -d '{}' | grep -q 'test.md' || exit 1; \
|
||||
curl -sf -X POST localhost:8080/homelab.v1.HomelabService/RunScript -H 'Content-Type: application/json' -d '{"name":"greet","args":["pony","42"]}' | grep -q 'arg1: pony' || exit 1; \
|
||||
kill %1; echo OK
|
||||
|
||||
Reference in New Issue
Block a user