mirror of
https://github.com/FlipsideCrypto/livequery-models.git
synced 2026-02-06 10:56:46 +00:00
fix test
This commit is contained in:
parent
5ae4187602
commit
31545aef7d
@ -16,9 +16,10 @@
|
||||
live.udf_api_v2(
|
||||
'GET',
|
||||
'https://api.github.com/octocat',
|
||||
{'Authorization': 'Bearer {TOKEN}', 'X-GitHub-Api-Version': '2022-11-28', 'fsc-quantum-execution-mode': 'async'},
|
||||
{'Authorization': 'Bearer {TOKEN}', 'X-GitHub-Api-Version': '2022-11-28'},
|
||||
{},
|
||||
IFF(_utils.udf_whoami() <> CURRENT_USER(), '_FSC_SYS/GITHUB', 'Vault/github/api')
|
||||
IFF(_utils.udf_whoami() <> CURRENT_USER(), '_FSC_SYS/GITHUB', 'Vault/github/api'),
|
||||
TRUE
|
||||
)
|
||||
{%- else -%}
|
||||
live.udf_api(
|
||||
@ -43,7 +44,6 @@
|
||||
SELECT '{"Authorization": "Bearer {TOKEN}",
|
||||
"X-GitHub-Api-Version": "2022-11-28",
|
||||
"Accept": "application/vnd.github+json",
|
||||
"fsc-quantum-execution-mode": "async"
|
||||
}'
|
||||
|
||||
- name: {{ schema_name -}}.get_api
|
||||
@ -63,7 +63,8 @@
|
||||
CONCAT_WS('/', 'https://api.github.com', route || '?') || utils.udf_urlencode(query),
|
||||
PARSE_JSON({{ schema_name -}}.headers()),
|
||||
{},
|
||||
IFF(_utils.udf_whoami() <> CURRENT_USER(), '_FSC_SYS/GITHUB', 'Vault/github/api')
|
||||
IFF(_utils.udf_whoami() <> CURRENT_USER(), '_FSC_SYS/GITHUB', 'Vault/github/api'),
|
||||
TRUE
|
||||
)
|
||||
{%- else -%}
|
||||
live.udf_api(
|
||||
@ -92,7 +93,8 @@
|
||||
CONCAT_WS('/', 'https://api.github.com', route),
|
||||
PARSE_JSON({{ schema_name -}}.headers()),
|
||||
data,
|
||||
IFF(_utils.udf_whoami() <> CURRENT_USER(), '_FSC_SYS/GITHUB', 'Vault/github/api')
|
||||
IFF(_utils.udf_whoami() <> CURRENT_USER(), '_FSC_SYS/GITHUB', 'Vault/github/api'),
|
||||
TRUE
|
||||
)
|
||||
{%- else -%}
|
||||
live.udf_api(
|
||||
@ -121,7 +123,8 @@
|
||||
CONCAT_WS('/', 'https://api.github.com', route),
|
||||
PARSE_JSON({{ schema_name -}}.headers()),
|
||||
data,
|
||||
IFF(_utils.udf_whoami() <> CURRENT_USER(), '_FSC_SYS/GITHUB', 'Vault/github/api')
|
||||
IFF(_utils.udf_whoami() <> CURRENT_USER(), '_FSC_SYS/GITHUB', 'Vault/github/api'),
|
||||
TRUE
|
||||
)
|
||||
{%- else -%}
|
||||
live.udf_api(
|
||||
|
||||
@ -231,7 +231,7 @@ models:
|
||||
- test_udf:
|
||||
name: test__live_udf_api_v2_get_with_params_sync
|
||||
args: |
|
||||
'GET', 'https://httpbin.org/get', {'Content-Type': 'application/json'}, {'param1': 'value1', 'param2': 'value2'}, ''
|
||||
'GET', 'https://httpbin.org/get', {'Content-Type': 'application/json'}, {'param1': 'value1', 'param2': 'value2'}, FALSE
|
||||
assertions:
|
||||
- result:status_code IN (200, 502, 503)
|
||||
- CASE WHEN result:status_code = 200 THEN result:data.args is not null ELSE true END
|
||||
@ -248,7 +248,7 @@ models:
|
||||
'id': 1,
|
||||
'method': 'getVersion'
|
||||
},
|
||||
''
|
||||
FALSE
|
||||
assertions:
|
||||
- result:status_code IN (200, 502, 503)
|
||||
- CASE WHEN result:status_code = 200 THEN result:data.jsonrpc = '2.0' ELSE true END
|
||||
@ -264,7 +264,7 @@ models:
|
||||
{'jsonrpc': '2.0', 'id': 1, 'method': 'getVersion'},
|
||||
{'jsonrpc': '2.0', 'id': 2, 'method': 'getVersion'}
|
||||
],
|
||||
''
|
||||
FALSE
|
||||
assertions:
|
||||
- result:status_code IN (200, 502, 503)
|
||||
- CASE WHEN result:status_code = 200 THEN result:data[0]:jsonrpc = '2.0' ELSE true END
|
||||
@ -283,7 +283,7 @@ models:
|
||||
{'jsonrpc': '2.0', 'id': 1, 'method': 'eth_blockNumber', 'params': []},
|
||||
{'jsonrpc': '2.0', 'id': 2, 'method': 'eth_chainId', 'params': []}
|
||||
],
|
||||
''
|
||||
FALSE
|
||||
assertions:
|
||||
- result:status_code IN (200, 502, 503)
|
||||
- CASE WHEN result:status_code = 200 THEN result:data[0]:jsonrpc = '2.0' ELSE true END
|
||||
@ -297,7 +297,7 @@ models:
|
||||
- test_udf:
|
||||
name: test__live_udf_api_v2_get_with_params_async
|
||||
args: |
|
||||
'GET', 'https://httpbin.org/get', {'Content-Type': 'application/json', 'fsc-quantum-execution-mode': 'async'}, {'param1': 'value1', 'param2': 'value2'}, ''
|
||||
'GET', 'https://httpbin.org/get', {'Content-Type': 'application/json'}, {'param1': 'value1', 'param2': 'value2'}, TRUE
|
||||
assertions:
|
||||
- result:status_code IN (200, 502, 503)
|
||||
- CASE WHEN result:status_code = 200 THEN result:data.args is not null ELSE true END
|
||||
@ -308,13 +308,13 @@ models:
|
||||
args: |
|
||||
'POST',
|
||||
'https://api.mainnet-beta.solana.com',
|
||||
{'Content-Type': 'application/json', 'fsc-quantum-execution-mode': 'async'},
|
||||
{'Content-Type': 'application/json'},
|
||||
{
|
||||
'jsonrpc': '2.0',
|
||||
'id': 1,
|
||||
'method': 'getVersion'
|
||||
},
|
||||
''
|
||||
TRUE
|
||||
assertions:
|
||||
- result:status_code IN (200, 502, 503)
|
||||
- CASE WHEN result:status_code = 200 THEN result:data.jsonrpc = '2.0' ELSE true END
|
||||
@ -325,12 +325,12 @@ models:
|
||||
args: |
|
||||
'POST',
|
||||
'https://api.mainnet-beta.solana.com',
|
||||
{'Content-Type': 'application/json', 'fsc-quantum-execution-mode': 'async'},
|
||||
{'Content-Type': 'application/json'},
|
||||
[
|
||||
{'jsonrpc': '2.0', 'id': 1, 'method': 'getVersion'},
|
||||
{'jsonrpc': '2.0', 'id': 2, 'method': 'getVersion'}
|
||||
],
|
||||
''
|
||||
TRUE
|
||||
assertions:
|
||||
- result:status_code IN (200, 502, 503)
|
||||
- CASE WHEN result:status_code = 200 THEN result:data[0]:jsonrpc = '2.0' ELSE true END
|
||||
@ -344,12 +344,12 @@ models:
|
||||
args: |
|
||||
'POST',
|
||||
'https://ethereum-rpc.publicnode.com',
|
||||
{'Content-Type': 'application/json', 'fsc-quantum-execution-mode': 'async'},
|
||||
{'Content-Type': 'application/json'},
|
||||
[
|
||||
{'jsonrpc': '2.0', 'id': 1, 'method': 'eth_blockNumber', 'params': []},
|
||||
{'jsonrpc': '2.0', 'id': 2, 'method': 'eth_chainId', 'params': []}
|
||||
],
|
||||
''
|
||||
TRUE
|
||||
assertions:
|
||||
- result:status_code IN (200, 502, 503)
|
||||
- CASE WHEN result:status_code = 200 THEN result:data[0]:jsonrpc = '2.0' ELSE true END
|
||||
|
||||
Loading…
Reference in New Issue
Block a user