Skip to content

Create a test Cardano transactions builder #1703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 22, 2024

Conversation

dlachaume
Copy link
Collaborator

@dlachaume dlachaume commented May 21, 2024

Content

This PR adds the CardanoTransactionsBuilder, which aims to easily build transactions for test cases.

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • No clippy warnings in the CI
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)

Issue(s)

Closes #1667

Copy link

github-actions bot commented May 21, 2024

Test Results

    3 files  ± 0     43 suites  ±0   8m 29s ⏱️ -9s
  985 tests +14    985 ✅ +14  0 💤 ±0  0 ❌ ±0 
1 079 runs  +14  1 079 ✅ +14  0 💤 ±0  0 ❌ ±0 

Results for commit c8342cb. ± Comparison against base commit 1ef4fb7.

This pull request removes 1 and adds 15 tests. Note that renamed tests count towards both.
mithril-persistence ‑ database::repository::cardano_transaction_repository::tests::repository_store_transactions_with_existing_hash_doesnt_erase_existing_data
mithril-common ‑ test_utils::cardano_transactions_builder::test::build_block_ranges_return_many_transactions_per_block_when_requested
mithril-common ‑ test_utils::cardano_transactions_builder::test::build_block_ranges_return_the_number_of_block_ranges_requested
mithril-common ‑ test_utils::cardano_transactions_builder::test::build_block_ranges_with_many_blocks_per_block_ranges
mithril-common ‑ test_utils::cardano_transactions_builder::test::build_transactions_with_immutable_file_starting_at_a_specific_number
mithril-common ‑ test_utils::cardano_transactions_builder::test::build_transactions_with_many_blocks_per_block_ranges
mithril-common ‑ test_utils::cardano_transactions_builder::test::build_transactions_with_many_transactions_per_immutable_file
mithril-common ‑ test_utils::cardano_transactions_builder::test::build_transactions_with_same_number_of_transactions_per_immutable_file
mithril-common ‑ test_utils::cardano_transactions_builder::test::generate_one_block_range_return_one_transaction_by_default
mithril-common ‑ test_utils::cardano_transactions_builder::test::only_the_last_block_is_not_full_when_we_can_not_fill_all_blocks
mithril-common ‑ test_utils::cardano_transactions_builder::test::return_all_transactions_in_same_block_when_ask_less_transactions_than_transactions_per_block
…

♻️ This comment has been updated with latest results.

@dlachaume dlachaume temporarily deployed to testing-sanchonet May 21, 2024 15:08 — with GitHub Actions Inactive
@dlachaume dlachaume requested review from jpraynaud and Alenar May 21, 2024 15:21
@dlachaume dlachaume marked this pull request as ready for review May 21, 2024 15:22
@dlachaume dlachaume temporarily deployed to testing-preview May 21, 2024 15:47 — with GitHub Actions Inactive
@dlachaume dlachaume temporarily deployed to testing-sanchonet May 21, 2024 15:47 — with GitHub Actions Inactive
Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

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

Overall looks good 👍

I left some comments and suggestions below.

@dlachaume dlachaume force-pushed the ensemble/1667/create-test-ctx-builder branch from 1342696 to 80c06db Compare May 22, 2024 13:32
Copy link
Collaborator

@Alenar Alenar left a comment

Choose a reason for hiding this comment

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

LGTM

@dlachaume dlachaume temporarily deployed to testing-preview May 22, 2024 13:39 — with GitHub Actions Inactive
@dlachaume dlachaume temporarily deployed to testing-sanchonet May 22, 2024 13:39 — with GitHub Actions Inactive
@dlachaume dlachaume force-pushed the ensemble/1667/create-test-ctx-builder branch from 80c06db to c8342cb Compare May 22, 2024 13:40
@dlachaume dlachaume requested a review from jpraynaud May 22, 2024 13:46
@dlachaume dlachaume temporarily deployed to testing-preview May 22, 2024 13:47 — with GitHub Actions Inactive
@dlachaume dlachaume temporarily deployed to testing-sanchonet May 22, 2024 13:47 — with GitHub Actions Inactive
Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@dlachaume dlachaume merged commit 1bea5eb into main May 22, 2024
41 checks passed
@dlachaume dlachaume deleted the ensemble/1667/create-test-ctx-builder branch May 22, 2024 13:58
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.

Create a test Cardano transactions builder
4 participants