mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-23 19:31:00 +08:00
Fixed integration test and openapi syntax
This commit is contained in:
@@ -142,7 +142,7 @@ paths:
|
||||
If use_latest_tip == true, the query will be run from the latest known tip (includes unconfirmed state).
|
||||
If use_latest_tip == false or is unspecified, the tip is selected as usual (first checking value of the
|
||||
tip parameter, otherwise taking the stacks chain tip).
|
||||
x-codegen-request-body-name: key
|
||||
x-codegen-request-body-name: key
|
||||
requestBody:
|
||||
description: Hex string serialization of the lookup key (which should be a Clarity value)
|
||||
required: true
|
||||
|
||||
@@ -1536,7 +1536,6 @@ impl ConversationHttp {
|
||||
Some(unconfirmed_state) => {
|
||||
if unconfirmed_state.is_readable() {
|
||||
// Check if underlying MARF trie exists before returning unconfirmed chain tip
|
||||
// let unconfirmed_state = self.unconfirmed_state.as_mut().unwrap();
|
||||
let trie_exists = match unconfirmed_state
|
||||
.clarity_inst
|
||||
.trie_exists_for_block(&unconfirmed_state.unconfirmed_chain_tip)
|
||||
@@ -1547,7 +1546,7 @@ impl ConversationHttp {
|
||||
warn!("Failed to load Stacks chain tip; error checking underlying trie");
|
||||
let response = HttpResponseType::ServerError(
|
||||
response_metadata,
|
||||
format!("Failed to load Stacks chain tip"),
|
||||
format!("Failed to load Stacks chain tip: {:?}", e),
|
||||
);
|
||||
return response.send(http, fd).and_then(|_| Ok(None));
|
||||
}
|
||||
|
||||
@@ -822,14 +822,14 @@ fn integration_test_get_info() {
|
||||
assert!(!res.is_implemented);
|
||||
|
||||
// test query parameters for v2/trait endpoint
|
||||
// evaluate check for explicit compliance against the chain tip of the first block (contract DNE at that block)
|
||||
let path = format!("{}/v2/traits/{}/{}/{}/{}/{}?tip=e96d9f02217af8025f39164c841dc33d6670687b2e3f948c75752145fb6a1275", &http_origin, &contract_addr, "impl-trait-contract", &contract_addr, "get-info", "trait-1");
|
||||
// evaluate check for explicit compliance against the chain tip of the first block (contract DNE at that block)
|
||||
let path = format!("{}/v2/traits/{}/{}/{}/{}/{}?tip=753d84de5c475a85abd0eeb3ac87da03ff0f794507b60a3f66356425bc1dedaf", &http_origin, &contract_addr, "impl-trait-contract", &contract_addr, "get-info", "trait-1");
|
||||
let res = client.get(&path).send().unwrap();
|
||||
eprintln!("Test: GET {}", path);
|
||||
assert_eq!(res.text().unwrap(), "No contract analysis found or trait definition not found");
|
||||
|
||||
// evaluate check for explicit compliance where tip is the chain tip of the first block (contract DNE at that block), but use_latest_tip is true
|
||||
let path = format!("{}/v2/traits/{}/{}/{}/{}/{}?tip=e96d9f02217af8025f39164c841dc33d6670687b2e3f948c75752145fb6a1275&use_latest_tip={}", &http_origin, &contract_addr, "impl-trait-contract", &contract_addr, "get-info", "trait-1", "1");
|
||||
let path = format!("{}/v2/traits/{}/{}/{}/{}/{}?tip=753d84de5c475a85abd0eeb3ac87da03ff0f794507b60a3f66356425bc1dedaf&use_latest_tip={}", &http_origin, &contract_addr, "impl-trait-contract", &contract_addr, "get-info", "trait-1", "1");
|
||||
let res = client.get(&path).send().unwrap().json::<GetIsTraitImplementedResponse>().unwrap();
|
||||
eprintln!("Test: GET {}", path);
|
||||
assert!(res.is_implemented);
|
||||
|
||||
@@ -1686,7 +1686,7 @@ fn microblock_integration_test() {
|
||||
sleep_ms(5_000);
|
||||
continue;
|
||||
}
|
||||
Some(tip) => break tip_info,
|
||||
Some(_tip) => break tip_info,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user