Skip to content

Provide access to consumed resources in integration tests#3781

Closed
jvff wants to merge 18 commits intolinera-io:mainfrom
jvff:provide-access-to-consumed-resources-in-tests
Closed

Provide access to consumed resources in integration tests#3781
jvff wants to merge 18 commits intolinera-io:mainfrom
jvff:provide-access-to-consumed-resources-in-tests

Conversation

@jvff
Copy link
Contributor

@jvff jvff commented Apr 16, 2025

Motivation

Messages may be sent with resource grants so that the message receiver doesn't have to pay any fees to receive the message. However, figuring out how much resources to include in the grant is not trivial.

Proposal

Add support for writing integration tests asserting whether a block consumed less resources than those that would be provided by a grant.

Test Plan

TODO: this needs a test.

Release Plan

  • These changes follow the usual release cycle, because this adds a new breaking change to the SDK.

Links

jvff added 14 commits April 16, 2025 06:01
Prepare to propagate the consumed resources back to integration tests
using the SDK.
Prepare to propagate the consumed resources back to integration tests
using the SDK.
Prepare to propagate the consumed resources back to integration tests
using the SDK.
Prepare to propagate the consumed resources back to integration tests
using the SDK.
Prepare to propagate the consumed resources back to integration tests
using the SDK.
Contains the certificate and the consumed resources.
Include the consumed resources with the certificate.
Use the new type so that the caller can check the consumed resources.
Use the new type for consistency.
Use the type returned by the `ActiveChain` methods that add a block.
Provide the same API used by some example integration tests.
Provide a similar API used by some example integration tests.
Remove the unnecessary `unwrap`s now that the API was tweaked.
A method to help writing assertions that a block used less resources
than those provided by a grant.
@jvff jvff added the enhancement New feature or request label Apr 16, 2025
@jvff jvff added this to the Testnet #3 milestone Apr 16, 2025
@jvff jvff requested review from afck, bart-linera, deuszx and ma2bd April 16, 2025 06:28
@jvff jvff self-assigned this Apr 16, 2025
@ma2bd ma2bd marked this pull request as ready for review April 23, 2025 10:42
@deuszx deuszx force-pushed the provide-access-to-consumed-resources-in-tests branch from ed079b3 to c7b1d31 Compare May 1, 2025 16:45
@ma2bd ma2bd marked this pull request as draft May 23, 2025 01:23
@ma2bd ma2bd assigned deuszx and unassigned jvff May 23, 2025
@ma2bd ma2bd closed this Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants