fix: Cleanup blueprint names and add tests
All checks were successful
Build Docker / BuildImage (push) Successful in 2m17s

This commit is contained in:
2025-10-13 15:32:31 +11:00
parent 3d5c16f9cb
commit 7f591e2724
16 changed files with 320 additions and 201 deletions

17
tests/api.hurl Normal file
View File

@@ -0,0 +1,17 @@
GET http://127.0.0.1:5000/api/v1/
HTTP 200
GET http://127.0.0.1:5000/api/v1/help
HTTP 200
GET http://127.0.0.1:5000/api/v1/ip
HTTP 200
[Asserts]
jsonpath "$.ip" == "127.0.0.1"
GET http://127.0.0.1:5000/api/v1/time
HTTP 200
GET http://127.0.0.1:5000/api/v1/timezone
HTTP 200
GET http://127.0.0.1:5000/api/v1/message
HTTP 200
GET http://127.0.0.1:5000/api/v1/project
HTTP 200

9
tests/blog.hurl Normal file
View File

@@ -0,0 +1,9 @@
GET http://127.0.0.1:5000/blog/
HTTP 200
GET http://127.0.0.1:5000/blog/Fingertip_on_Linux_Mint
HTTP 200
GET http://127.0.0.1:5000/blog/Fingertip_on_Linux_Mint.md
HTTP 200

41
tests/legacy_api.hurl Normal file
View File

@@ -0,0 +1,41 @@
GET http://127.0.0.1:5000/api/help
HTTP 301
[Asserts]
header "Location" == "/api/v1/help"
GET http://127.0.0.1:5000/api/ip
HTTP 301
[Asserts]
header "Location" == "/api/v1/ip"
GET http://127.0.0.1:5000/api/message
HTTP 301
[Asserts]
header "Location" == "/api/v1/message"
GET http://127.0.0.1:5000/api/project
HTTP 301
[Asserts]
header "Location" == "/api/v1/project"
GET http://127.0.0.1:5000/api/donate
HTTP 301
[Asserts]
header "Location" == "/api/v1/donate"
GET http://127.0.0.1:5000/api/time
HTTP 301
[Asserts]
header "Location" == "/api/v1/time"
GET http://127.0.0.1:5000/api/timezone
HTTP 301
[Asserts]
header "Location" == "/api/v1/timezone"
GET http://127.0.0.1:5000/api/version
HTTP 301
[Asserts]
header "Location" == "/api/v1/version"

24
tests/now.hurl Normal file
View File

@@ -0,0 +1,24 @@
GET http://127.0.0.1:5000/now/
HTTP 200
GET http://127.0.0.1:5000/now/old
HTTP 200
GET http://127.0.0.1:5000/now/24_02_18
HTTP 200
GET http://127.0.0.1:5000/now/24_02_18
HTTP 200
GET http://127.0.0.1:5000/now/now.json
HTTP 200
GET http://127.0.0.1:5000/now/now.xml
HTTP 200
GET http://127.0.0.1:5000/now/now.rss
HTTP 200
GET http://127.0.0.1:5000/now/rss.xml
HTTP 200

14
tests/sol.hurl Normal file
View File

@@ -0,0 +1,14 @@
POST http://127.0.0.1:5000/api/v1/donate/1
{"account": "1111111111111111111111111111111B"}
POST http://127.0.0.1:5000/api/v1/donate/0.01
{"account": "1111111111111111111111111111111C"}
POST http://127.0.0.1:5000/api/v1/donate/0.1
{"account": "1111111111111111111111111111111D"}
POST http://127.0.0.1:5000/api/v1/donate/0.02
{"account": "1111111111111111111111111111111E"}
POST http://127.0.0.1:5000/api/v1/donate/{amount}
{"account": "11111111111111111111111111111112"}

11
tests/well-known.hurl Normal file
View File

@@ -0,0 +1,11 @@
GET http://127.0.0.1:5000/.well-known/xrp-ledger.toml
HTTP 200
GET http://127.0.0.1:5000/.well-known/nostr.json?name=hurl
HTTP 200
[Asserts]
jsonpath "$.names.hurl" == "b57b6a06fdf0a4095eba69eee26e2bf6fa72bd1ce6cbe9a6f72a7021c7acaa82"
GET http://127.0.0.1:5000/.well-known/wallets/BTC
HTTP 200