test: codex testing

This commit is contained in:
Vlad Stan
2026-03-30 09:56:42 +03:00
parent 6a2ade1695
commit 613f88faf2
2 changed files with 526 additions and 27 deletions
+404 -4
View File
@@ -49,6 +49,14 @@
"phoenixd_api_password": "f171ba022a764e679eef950b21fb1c04f171ba022a764e679eef950b21fb1c04",
"user_agent": "LNbits/Tests"
}
},
"sparkl2": {
"wallet_class": "SparkL2Wallet",
"settings": {
"spark_l2_external_endpoint": "http://127.0.0.1:8555",
"spark_l2_external_api_key": "mock-spark-l2-api-key",
"user_agent": "LNbits/Tests"
}
}
},
"functions": {
@@ -115,6 +123,16 @@
},
"method": "GET"
}
},
"sparkl2": {
"status_endpoint": {
"uri": "/v1/balance",
"headers": {
"X-Api-Key": "mock-spark-l2-api-key",
"User-Agent": "LNbits/Tests"
},
"method": "POST"
}
}
},
"tests": [
@@ -190,6 +208,16 @@
}
}
]
},
"sparkl2": {
"status_endpoint": [
{
"response_type": "json",
"response": {
"balance_sats": 55
}
}
]
}
}
},
@@ -255,6 +283,16 @@
"response": "test-error"
}
]
},
"sparkl2": {
"status_endpoint": [
{
"response_type": "json",
"response": {
"error": "\"test-error\""
}
}
]
}
}
},
@@ -313,6 +351,14 @@
"response": {}
}
]
},
"sparkl2": {
"status_endpoint": [
{
"response_type": "json",
"response": {}
}
]
}
}
},
@@ -371,6 +417,14 @@
"response": "data-not-json"
}
]
},
"sparkl2": {
"status_endpoint": [
{
"response_type": "data",
"response": "data-not-json"
}
]
}
}
},
@@ -447,6 +501,17 @@
}
}
]
},
"sparkl2": {
"status_endpoint": [
{
"response_type": "response",
"response": {
"response": "Not Found",
"status": 404
}
}
]
}
}
},
@@ -523,6 +588,16 @@
},
"method": "POST"
}
},
"sparkl2": {
"create_invoice_endpoint": {
"uri": "/v1/invoices",
"headers": {
"X-Api-Key": "mock-spark-l2-api-key",
"User-Agent": "LNbits/Tests"
},
"method": "POST"
}
}
},
"tests": [
@@ -638,6 +713,24 @@
}
}
]
},
"sparkl2": {
"create_invoice_endpoint": [
{
"request_type": "json",
"request_body": {
"amount_sats": 555,
"memo": "Test Invoice",
"description_hash": null,
"expiry_seconds": null
},
"response_type": "json",
"response": {
"checking_id": "e35526a43d04e985594c0dfab848814f524b1c786598ec9a63beddb2d726ac96",
"payment_request": "lnbc5550n1pnq9jg3sp52rvwstvjcypjsaenzdh0h30jazvzsf8aaye0julprtth9kysxtuspp5e5s3z7felv4t9zrcc6wpn7ehvjl5yzewanzl5crljdl3jgeffyhqdq2f38xy6t5wvxqzjccqpjrzjq0yzeq76ney45hmjlnlpvu0nakzy2g35hqh0dujq8ujdpr2e42pf2rrs6vqpgcsqqqqqqqqqqqqqqeqqyg9qxpqysgqwftcx89k5pp28435pgxfl2vx3ksemzxccppw2j9yjn0ngr6ed7wj8ztc0d5kmt2mvzdlcgrludhz7jncd5l5l9w820hc4clpwhtqj3gq62g66n"
}
}
]
}
}
},
@@ -735,6 +828,23 @@
}
}
]
},
"sparkl2": {
"create_invoice_endpoint": [
{
"request_type": "json",
"request_body": {
"amount_sats": 555,
"memo": "Test Invoice",
"description_hash": null,
"expiry_seconds": null
},
"response_type": "json",
"response": {
"error": "Test Error"
}
}
]
}
}
},
@@ -845,6 +955,21 @@
}
}
]
},
"sparkl2": {
"create_invoice_endpoint": [
{
"request_type": "json",
"request_body": {
"amount_sats": 555,
"memo": "Test Invoice",
"description_hash": null,
"expiry_seconds": null
},
"response_type": "json",
"response": {}
}
]
}
}
},
@@ -942,6 +1067,21 @@
"response": "data-not-json"
}
]
},
"sparkl2": {
"create_invoice_endpoint": [
{
"request_type": "json",
"request_body": {
"amount_sats": 555,
"memo": "Test Invoice",
"description_hash": null,
"expiry_seconds": null
},
"response_type": "data",
"response": "data-not-json"
}
]
}
}
},
@@ -1057,6 +1197,24 @@
}
}
]
},
"sparkl2": {
"create_invoice_endpoint": [
{
"request_type": "json",
"request_body": {
"amount_sats": 555,
"memo": "Test Invoice",
"description_hash": null,
"expiry_seconds": null
},
"response_type": "response",
"response": {
"response": "Not Found",
"status": 404
}
}
]
}
}
},
@@ -1155,6 +1313,16 @@
},
"method": "POST"
}
},
"sparkl2": {
"pay_invoice_endpoint": {
"uri": "/v1/payments",
"headers": {
"X-Api-Key": "mock-spark-l2-api-key",
"User-Agent": "LNbits/Tests"
},
"method": "POST"
}
}
},
"tests": [
@@ -1309,6 +1477,24 @@
}
}
]
},
"sparkl2": {
"pay_invoice_endpoint": [
{
"request_type": "json",
"request_body": {
"bolt11": "lnbc210n1pjlgal5sp5xr3uwlfm7ltumdjyukhys0z2rw6grgm8me9k4w9vn05zt9svzzjspp5ud2jdfpaqn5c2k2vphatsjypfafyk8rcvkvwexnrhmwm94ex4jtqdqu24hxjapq23jhxapqf9h8vmmfvdjscqpjrzjqta942048v7qxh5x7pxwplhmtwfl0f25cq23jh87rhx7lgrwwvv86r90guqqnwgqqqqqqqqqqqqqqpsqyg9qxpqysgqylngsyg960lltngzy90e8n22v4j2hvjs4l4ttuy79qqefjv8q87q9ft7uhwdjakvnsgk44qyhalv6ust54x98whl3q635hkwgsyw8xgqjl7jwu",
"max_fee_sats": 25,
"payment_hash": "e35526a43d04e985594c0dfab848814f524b1c786598ec9a63beddb2d726ac96"
},
"response_type": "json",
"response": {
"status": "LIGHTNING_PAYMENT_SUCCEEDED",
"fee_msat": 30000,
"preimage": "0000000000000000000000000000000000000000000000000000000000000000"
}
}
]
}
}
},
@@ -1361,7 +1547,23 @@
"alby": {},
"eclair": [],
"lnbits": [],
"phoenixd": []
"phoenixd": [],
"sparkl2": {
"pay_invoice_endpoint": [
{
"request_type": "json",
"request_body": {
"bolt11": "lnbc210n1pjlgal5sp5xr3uwlfm7ltumdjyukhys0z2rw6grgm8me9k4w9vn05zt9svzzjspp5ud2jdfpaqn5c2k2vphatsjypfafyk8rcvkvwexnrhmwm94ex4jtqdqu24hxjapq23jhxapqf9h8vmmfvdjscqpjrzjqta942048v7qxh5x7pxwplhmtwfl0f25cq23jh87rhx7lgrwwvv86r90guqqnwgqqqqqqqqqqqqqqpsqyg9qxpqysgqylngsyg960lltngzy90e8n22v4j2hvjs4l4ttuy79qqefjv8q87q9ft7uhwdjakvnsgk44qyhalv6ust54x98whl3q635hkwgsyw8xgqjl7jwu",
"max_fee_sats": 25,
"payment_hash": "e35526a43d04e985594c0dfab848814f524b1c786598ec9a63beddb2d726ac96"
},
"response_type": "json",
"response": {
"status": "LIGHTNING_PAYMENT_FAILED"
}
}
]
}
}
},
{
@@ -1505,7 +1707,24 @@
}
],
"lnbits": [],
"phoenixd": []
"phoenixd": [],
"sparkl2": {
"pay_invoice_endpoint": [
{
"request_type": "json",
"request_body": {
"bolt11": "lnbc210n1pjlgal5sp5xr3uwlfm7ltumdjyukhys0z2rw6grgm8me9k4w9vn05zt9svzzjspp5ud2jdfpaqn5c2k2vphatsjypfafyk8rcvkvwexnrhmwm94ex4jtqdqu24hxjapq23jhxapqf9h8vmmfvdjscqpjrzjqta942048v7qxh5x7pxwplhmtwfl0f25cq23jh87rhx7lgrwwvv86r90guqqnwgqqqqqqqqqqqqqqpsqyg9qxpqysgqylngsyg960lltngzy90e8n22v4j2hvjs4l4ttuy79qqefjv8q87q9ft7uhwdjakvnsgk44qyhalv6ust54x98whl3q635hkwgsyw8xgqjl7jwu",
"max_fee_sats": 25,
"payment_hash": "e35526a43d04e985594c0dfab848814f524b1c786598ec9a63beddb2d726ac96"
},
"response_type": "json",
"response": {
"status": "PAYMENT_PENDING",
"preimage": "0000000000000000000000000000000000000000000000000000000000000000"
}
}
]
}
}
},
{
@@ -1598,6 +1817,22 @@
}
}
]
},
"sparkl2": {
"pay_invoice_endpoint": [
{
"request_type": "json",
"request_body": {
"bolt11": "lnbc210n1pjlgal5sp5xr3uwlfm7ltumdjyukhys0z2rw6grgm8me9k4w9vn05zt9svzzjspp5ud2jdfpaqn5c2k2vphatsjypfafyk8rcvkvwexnrhmwm94ex4jtqdqu24hxjapq23jhxapqf9h8vmmfvdjscqpjrzjqta942048v7qxh5x7pxwplhmtwfl0f25cq23jh87rhx7lgrwwvv86r90guqqnwgqqqqqqqqqqqqqqpsqyg9qxpqysgqylngsyg960lltngzy90e8n22v4j2hvjs4l4ttuy79qqefjv8q87q9ft7uhwdjakvnsgk44qyhalv6ust54x98whl3q635hkwgsyw8xgqjl7jwu",
"max_fee_sats": 25,
"payment_hash": "e35526a43d04e985594c0dfab848814f524b1c786598ec9a63beddb2d726ac96"
},
"response_type": "json",
"response": {
"error": "Test Error"
}
}
]
}
}
},
@@ -1695,6 +1930,20 @@
}
}
]
},
"sparkl2": {
"pay_invoice_endpoint": [
{
"request_type": "json",
"request_body": {
"bolt11": "lnbc210n1pjlgal5sp5xr3uwlfm7ltumdjyukhys0z2rw6grgm8me9k4w9vn05zt9svzzjspp5ud2jdfpaqn5c2k2vphatsjypfafyk8rcvkvwexnrhmwm94ex4jtqdqu24hxjapq23jhxapqf9h8vmmfvdjscqpjrzjqta942048v7qxh5x7pxwplhmtwfl0f25cq23jh87rhx7lgrwwvv86r90guqqnwgqqqqqqqqqqqqqqpsqyg9qxpqysgqylngsyg960lltngzy90e8n22v4j2hvjs4l4ttuy79qqefjv8q87q9ft7uhwdjakvnsgk44qyhalv6ust54x98whl3q635hkwgsyw8xgqjl7jwu",
"max_fee_sats": 25,
"payment_hash": "e35526a43d04e985594c0dfab848814f524b1c786598ec9a63beddb2d726ac96"
},
"response_type": "json",
"response": {}
}
]
}
}
},
@@ -1813,6 +2062,20 @@
"response": "data-not-json"
}
]
},
"sparkl2": {
"pay_invoice_endpoint": [
{
"request_type": "json",
"request_body": {
"bolt11": "lnbc210n1pjlgal5sp5xr3uwlfm7ltumdjyukhys0z2rw6grgm8me9k4w9vn05zt9svzzjspp5ud2jdfpaqn5c2k2vphatsjypfafyk8rcvkvwexnrhmwm94ex4jtqdqu24hxjapq23jhxapqf9h8vmmfvdjscqpjrzjqta942048v7qxh5x7pxwplhmtwfl0f25cq23jh87rhx7lgrwwvv86r90guqqnwgqqqqqqqqqqqqqqpsqyg9qxpqysgqylngsyg960lltngzy90e8n22v4j2hvjs4l4ttuy79qqefjv8q87q9ft7uhwdjakvnsgk44qyhalv6ust54x98whl3q635hkwgsyw8xgqjl7jwu",
"max_fee_sats": 25,
"payment_hash": "e35526a43d04e985594c0dfab848814f524b1c786598ec9a63beddb2d726ac96"
},
"response_type": "data",
"response": "data-not-json"
}
]
}
}
},
@@ -1943,6 +2206,23 @@
}
}
]
},
"sparkl2": {
"pay_invoice_endpoint": [
{
"request_type": "json",
"request_body": {
"bolt11": "lnbc210n1pjlgal5sp5xr3uwlfm7ltumdjyukhys0z2rw6grgm8me9k4w9vn05zt9svzzjspp5ud2jdfpaqn5c2k2vphatsjypfafyk8rcvkvwexnrhmwm94ex4jtqdqu24hxjapq23jhxapqf9h8vmmfvdjscqpjrzjqta942048v7qxh5x7pxwplhmtwfl0f25cq23jh87rhx7lgrwwvv86r90guqqnwgqqqqqqqqqqqqqqpsqyg9qxpqysgqylngsyg960lltngzy90e8n22v4j2hvjs4l4ttuy79qqefjv8q87q9ft7uhwdjakvnsgk44qyhalv6ust54x98whl3q635hkwgsyw8xgqjl7jwu",
"max_fee_sats": 25,
"payment_hash": "e35526a43d04e985594c0dfab848814f524b1c786598ec9a63beddb2d726ac96"
},
"response_type": "response",
"response": {
"response": "Not Found",
"status": 404
}
}
]
}
}
},
@@ -2030,6 +2310,16 @@
},
"method": "GET"
}
},
"sparkl2": {
"get_invoice_status_endpoint": {
"uri": "/v1/invoices/e35526a43d04e985594c0dfab848814f524b1c786598ec9a63beddb2d726ac96",
"headers": {
"X-Api-Key": "mock-spark-l2-api-key",
"User-Agent": "LNbits/Tests"
},
"method": "GET"
}
}
},
"tests": [
@@ -2125,6 +2415,24 @@
}
}
]
},
"sparkl2": {
"get_invoice_status_endpoint": [
{
"description": "LIGHTNING_PAYMENT_RECEIVED",
"response_type": "json",
"response": {
"status": "LIGHTNING_PAYMENT_RECEIVED"
}
},
{
"description": "TRANSFER_COMPLETED",
"response_type": "json",
"response": {
"status": "TRANSFER_COMPLETED"
}
}
]
}
}
},
@@ -2193,7 +2501,8 @@
}
}
]
}
},
"sparkl2": {}
}
},
{
@@ -2400,6 +2709,35 @@
"response": "data-not-json"
}
]
},
"sparkl2": {
"get_invoice_status_endpoint": [
{
"description": "no data",
"response_type": "json",
"response": {}
},
{
"description": "pending status",
"response_type": "json",
"response": {
"status": "PAYMENT_PENDING"
}
},
{
"description": "bad json",
"response_type": "data",
"response": "data-not-json"
},
{
"description": "http 404",
"response_type": "response",
"response": {
"response": "Not Found",
"status": 404
}
}
]
}
}
},
@@ -2482,6 +2820,16 @@
},
"method": "GET"
}
},
"sparkl2": {
"get_payment_status_endpoint": {
"uri": "/v1/payments/e35526a43d04e985594c0dfab848814f524b1c786598ec9a63beddb2d726ac96",
"headers": {
"X-Api-Key": "mock-spark-l2-api-key",
"User-Agent": "LNbits/Tests"
},
"method": "GET"
}
}
},
"tests": [
@@ -2587,6 +2935,28 @@
}
}
]
},
"sparkl2": {
"get_payment_status_endpoint": [
{
"description": "LIGHTNING_PAYMENT_SUCCEEDED",
"response_type": "json",
"response": {
"status": "LIGHTNING_PAYMENT_SUCCEEDED",
"fee_msat": 1000,
"preimage": "0000000000000000000000000000000000000000000000000000000000000000"
}
},
{
"description": "TRANSFER_COMPLETED",
"response_type": "json",
"response": {
"status": "TRANSFER_COMPLETED",
"fee_msat": 1000,
"preimage": "0000000000000000000000000000000000000000000000000000000000000000"
}
}
]
}
}
},
@@ -2675,7 +3045,8 @@
}
}
]
}
},
"sparkl2": {}
}
},
{
@@ -2933,6 +3304,35 @@
"response": "data-not-json"
}
]
},
"sparkl2": {
"get_payment_status_endpoint": [
{
"description": "pending status",
"response_type": "json",
"response": {
"status": "PAYMENT_PENDING"
}
},
{
"description": "no data",
"response_type": "json",
"response": {}
},
{
"description": "bad json",
"response_type": "data",
"response": "data-not-json"
},
{
"description": "http 404",
"response_type": "response",
"response": {
"response": "Not Found",
"status": 404
}
}
]
}
}
},