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

tests(scanner): Move zebra scanner tests to binary #8659

Merged
merged 19 commits into from
Jul 15, 2024
Merged

Conversation

oxarbitrage
Copy link
Contributor

@oxarbitrage oxarbitrage commented Jun 28, 2024

Motivation

We moved the scanner into a new binary in #8608 . We also removed the scanner functionality from zebrad and commented out tests in #8594

Now is time to get the tests we commented out back, in the context of the new binary.

Close #8593

Part of #8585

Solution

Add tests to zebra scanner binary.

Follow-up Work

PR Author's Checklist

  • The PR name will make sense to users.
  • The PR provides a CHANGELOG summary.
  • The solution is tested.
  • The documentation is up to date.
  • The PR has a priority label.

PR Reviewer's Checklist

  • The PR Author's checklist is complete.
  • The PR resolves the issue.

@oxarbitrage oxarbitrage added A-blockchain-scanner Area: Blockchain scanner of shielded transactions P-Medium ⚡ labels Jun 28, 2024
@oxarbitrage oxarbitrage requested a review from a team as a code owner June 28, 2024 18:48
@oxarbitrage oxarbitrage requested review from arya2 and removed request for a team June 28, 2024 18:48
@github-actions github-actions bot added the C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG label Jun 28, 2024
@upbqdn upbqdn added the do-not-merge Tells Mergify not to merge this PR label Jun 28, 2024
@mpguerra
Copy link
Contributor

mpguerra commented Jul 1, 2024

Does this PR also cover #8593 ?

@mpguerra mpguerra linked an issue Jul 1, 2024 that may be closed by this pull request
@mpguerra mpguerra removed the do-not-merge Tells Mergify not to merge this PR label Jul 4, 2024
@oxarbitrage oxarbitrage requested a review from a team as a code owner July 9, 2024 15:14
Base automatically changed from zebra-scanner-binary to main July 9, 2024 18:50
@oxarbitrage
Copy link
Contributor Author

Does this PR also cover #8593 ?

Yes, this PR will close that issue. I added that to the description. I am rebasing now.

Copy link
Contributor

@arya2 arya2 left a comment

Choose a reason for hiding this comment

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

This looks good!

We should uncomment the scan-start-where-left-test CI job in this PR too (it was commented out here)

I'm not sure how reliable it is to define a CARGO_BIN_EXE_zebrad env var outside the build process. If it's not very reliable, I'd suggest adding a scanner binary in zebrad as well and moving the tests here that rely on the zebrad binary back to the zebrad acceptance tests (it's nicer to have these tests here but it seems much more difficult to add a zebrad binary in zebra-scan).

Update: It seems very easy to add a zebrad binary to zebra-scan, I would suggest doing that instead if it's valuable to have the CARGO_BIN_EXE_zebrad environment variable .

zebra-scan/tests/scanner.rs Show resolved Hide resolved
zebra-scan/tests/scanner.rs Show resolved Hide resolved
zebra-scan/tests/scanner.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@arya2 arya2 left a comment

Choose a reason for hiding this comment

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

@oxarbitrage The shielded-scan feature was partially removed from zebrad, but there are still some uses of it causing test failures.

@oxarbitrage
Copy link
Contributor Author

@oxarbitrage The shielded-scan feature was partially removed from zebrad, but there are still some uses of it causing test failures.

Ok, ill check that out. Thanks.

@oxarbitrage
Copy link
Contributor Author

Update: Need more work related to moving this test https://github.com/ZcashFoundation/zebra/blob/main/zebrad/tests/common/shielded_scan/scan_task_commands.rs out of zebrad. I am still working on it, changing the PR to draft until that is sorted.

@oxarbitrage oxarbitrage marked this pull request as draft July 10, 2024 21:49
@oxarbitrage oxarbitrage marked this pull request as ready for review July 15, 2024 17:13
@oxarbitrage oxarbitrage requested a review from a team as a code owner July 15, 2024 17:13
@oxarbitrage oxarbitrage requested review from gustavovalverde and removed request for a team July 15, 2024 17:13
Copy link
Contributor

@arya2 arya2 left a comment

Choose a reason for hiding this comment

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

This looks good!

zebra-scan/tests/scan_task_commands.rs Show resolved Hide resolved
zebrad/tests/acceptance.rs Show resolved Hide resolved
mergify bot added a commit that referenced this pull request Jul 15, 2024
@mergify mergify bot merged commit 1238ec0 into main Jul 15, 2024
174 checks passed
@mergify mergify bot deleted the zebra-scanner-tests branch July 15, 2024 21:15
@mpguerra mpguerra linked an issue Jul 17, 2024 that may be closed by this pull request
@arya2 arya2 mentioned this pull request Aug 1, 2024
43 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-blockchain-scanner Area: Blockchain scanner of shielded transactions C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG P-Medium ⚡
Projects
None yet
Development

Successfully merging this pull request may close these issues.

change(scan): Move integration tests for scanner out of zebrad Testing the new zebra-scanner binary
4 participants