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

consolidate integration tests into itests package; create test kit; cleanup #6311

Merged
merged 41 commits into from
Jun 10, 2021

Conversation

raulk
Copy link
Member

@raulk raulk commented May 21, 2021

Integration tests in Lotus are pretty coarse-grained. They exercise the whole Lotus stack top to bottom... i.e. they act like end-to-end tests.

They are quite a labyrinth too, as they are scattered between packages, and there's quite a bit of indirection. Folks that wrote new test cases ended up reinventing the wheel (mining loops, builders, etc.) because existing reusable code was hard to discover.

This PR aims to bring some initial order to the chaos.

This PR:

  • moves all integration tests to the itests package.
  • separates the testing utilities from the test cases themselves (introducing an itests/kit) package.

@raulk raulk marked this pull request as draft May 21, 2021 16:20
Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

Looks quite a bit better than the current state. Couple of notes:

@magik6k magik6k added the team/ignite Issues and PRs being tracked by Team Ignite at Protocol Labs label Jun 3, 2021
@raulk raulk marked this pull request as ready for review June 9, 2021 23:30
@raulk
Copy link
Member Author

raulk commented Jun 9, 2021

This is ready for final review and merge @magik6k 🎉 The merge was quite a pain, but finally done. Not sure if the test test suite will pass, but it's been running for 15min now and it looks like it's going to time out. I've checked master builds and this seems to be general flakiness. Happy to look at that once this is on master.

@raulk
Copy link
Member Author

raulk commented Jun 9, 2021

Actually: 🟢🟢🟢🟢🟢

@raulk raulk requested a review from arajasek June 9, 2021 23:42
Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

Just one comment, not blocking merge on it as it looks like currently we're not including this package outside of tests, but it should be addressed a followup PR

if err != nil {
panic(fmt.Sprintf("failed to set BELLMAN_NO_GPU env variable: %s", err))
}
build.InsecurePoStValidation = true
Copy link
Contributor

Choose a reason for hiding this comment

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

We should do something which makes sure we never include this package by accident in non-test builds, setting this variable in real lotus could be pretty catastrophic

Copy link
Contributor

Choose a reason for hiding this comment

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

@magik6k magik6k merged commit 6f80d9f into master Jun 10, 2021
@magik6k magik6k deleted the raulk/itests branch June 10, 2021 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team/ignite Issues and PRs being tracked by Team Ignite at Protocol Labs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants