Skip to content
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

Write tests (ui) tests against specific snapshots #3460

Open
aatifsyed opened this issue Sep 5, 2023 · 1 comment
Open

Write tests (ui) tests against specific snapshots #3460

aatifsyed opened this issue Sep 5, 2023 · 1 comment
Labels
Priority: 4 - Low Limited impact and can be implemented at any time Type: Enhancement

Comments

@aatifsyed
Copy link
Contributor

aatifsyed commented Sep 5, 2023

#3430 needs a way to run a snapshot test against a specific snapshot, but we don't have testing infrastructure for that yet.

I want to write this

#[test]
fn regression() {
    let snapshot = Snapshot::fixed("...");
    let expected = LotusHarness::fixed("1.23.3")
                   .run("...")
                   // ...
    let actual = forest_tool().run("...");
    assert_eq!(sanitised(expected), sanitised(actual));
}

#[test]
fn conformance() {
   let snapshot = Snapshot::latest();
   let expected = LotusHarness::latest();
   //...
}

The issue tracks:

  • Defining infrastructure and pattern for this
  • Adding a test
  • (Pattern for testing against lotus versions?)
@lemmih
Copy link
Contributor

lemmih commented Sep 6, 2023

We have migration tests that target specific calibnet snapshots. I'm not sure if this is the kind of thing you're referring to.

https://github.com/ChainSafe/forest/blob/main/scripts/tests/calibnet_migration_regression_tests.sh

@lemmih lemmih added Priority: 4 - Low Limited impact and can be implemented at any time Type: Enhancement labels Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 4 - Low Limited impact and can be implemented at any time Type: Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants