mirror of
https://github.com/FlipsideCrypto/livequery-models.git
synced 2026-02-06 10:56:46 +00:00
add udf_api_batched tests
This commit is contained in:
parent
dda9867037
commit
67d08aae1a
8
Makefile
8
Makefile
@ -14,9 +14,15 @@ rm_logs:
|
||||
|
||||
|
||||
deploy_core: rm_logs
|
||||
dbt run --select livequery_models.deploy.core._live \
|
||||
dbt run --select livequery_models.deploy.core.live \
|
||||
--vars '{UPDATE_UDFS_AND_SPS: true}' \
|
||||
--profiles-dir ~/.dbt \
|
||||
--profile livequery \
|
||||
--target dev
|
||||
|
||||
test_core: rm_logs
|
||||
dbt test --select live \
|
||||
--profiles-dir ~/.dbt \
|
||||
--profile livequery \
|
||||
--target dev
|
||||
|
||||
|
||||
@ -2,6 +2,57 @@ version: 2
|
||||
models:
|
||||
- name: live
|
||||
columns:
|
||||
- name: udf_api_batched
|
||||
tests:
|
||||
- test_udf:
|
||||
name: test__live_udf_api_batched_post_data_object
|
||||
args: |
|
||||
'GET',
|
||||
'https://httpbin.org/get',
|
||||
{'Content-Type': 'application/json'},
|
||||
{'param1': 'value1', 'param2': 'value2'},
|
||||
''
|
||||
assertions:
|
||||
- result:status_code = 200
|
||||
- result:data.args is not null
|
||||
- result:data.args:param1 = 'value1'
|
||||
- result:data.args:param2 = 'value2'
|
||||
- test_udf:
|
||||
name: test__live_udf_api_batched_post_jsonrpc_ethereum_batch
|
||||
args: |
|
||||
'POST',
|
||||
'https://ethereum-rpc.publicnode.com',
|
||||
{'Content-Type': 'application/json'},
|
||||
[
|
||||
{'jsonrpc': '2.0', 'id': 1, 'method': 'eth_blockNumber', 'params': []},
|
||||
{'jsonrpc': '2.0', 'id': 2, 'method': 'eth_chainId', 'params': []}
|
||||
],
|
||||
''
|
||||
assertions:
|
||||
- result:status_code = 200
|
||||
- result:data[0]:jsonrpc = '2.0'
|
||||
- result:data[0]:id = 1
|
||||
- result:data[0]:result is not null
|
||||
- result:data[1]:jsonrpc = '2.0'
|
||||
- result:data[1]:id = 2
|
||||
- result:data[1]:result = '0x1'
|
||||
- test_udf:
|
||||
name: test__live_udf_api_batched_post_jsonrpc_solana
|
||||
args: |
|
||||
'POST',
|
||||
'https://api.mainnet-beta.solana.com',
|
||||
{'Content-Type': 'application/json'},
|
||||
{
|
||||
'jsonrpc': '2.0',
|
||||
'id': 1,
|
||||
'method': 'getVersion'
|
||||
},
|
||||
''
|
||||
assertions:
|
||||
- result:status_code = 200
|
||||
- result:data.jsonrpc = '2.0'
|
||||
- result:data.id = 1
|
||||
- result:data.result is not null
|
||||
- name: udf_api
|
||||
tests:
|
||||
- test_udf:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user