Skip to content

Conversation

@brice-stacks
Copy link
Contributor

Adds an integration test from an old issue.

@brice-stacks brice-stacks requested review from a team as code owners November 11, 2025 17:12

#[test]
#[ignore]
fn least_supertype_test() {
Copy link
Contributor

@jacinta-stacks jacinta-stacks Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is nothing wrong with this, but it might be better suited as a ConsensusTest.

For e.g. this could reduce to:

contract_deploy_consensus_test!(
    chainstate_error_expression_stack_depth_too_deep,
    contract_name: "test-exceeds",
    contract_code: "(define-data-var my-list (list 10 { a: int }) (list { a: 1 }))
(var-set my-list
  (unwrap! (as-max-len?
    (append (var-get my-list)
            { a: 2, b: 2 })
    u10)
  (err  1)))
(print (var-get my-list))
",
);

And the output snapshot will basically show that for both Epoch 3.2 and Epoch 3.3 the transaction publish fails and with what error specifically.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, that certainly is concise! I don't like that there is no explicit check that the contract is not deployed in the test. I guess that would show up in the snapshot though? I still haven't looked into how these tests work exactly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it would show that the transaction itself fails with an error. If you want I can run through it with you :)

@brice-stacks brice-stacks marked this pull request as draft November 11, 2025 21:36
@brice-stacks
Copy link
Contributor Author

@jacinta-stacks is going to take this over and make it work in the consensus test framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants