Skip to content

add smoke test (uses darkside wallet server)#507

Merged
LarryRuane merged 1 commit intozcash:masterfrom
LarryRuane:2025-02-smoke-test
Mar 10, 2025
Merged

add smoke test (uses darkside wallet server)#507
LarryRuane merged 1 commit intozcash:masterfrom
LarryRuane:2025-02-smoke-test

Conversation

@LarryRuane
Copy link
Copy Markdown
Collaborator

Add "smoke" test. This is analogous to zcash's qa/zcash/smoke_tests.py (but the details are completely different). Our existing tests don't exercise the gRPC interface; this test addresses that deficiency. It doesn't exercise every gRPC (it could be extended), but is still a significant improvement in test coverage.

I've wanted to write this PR for a long time, but the tipping point was #505 (not yet merged at this time)-- that PR changes the gRPC interface internals (not functional behavior) quite a bit, and I didn't have a way to test those changes except manually. I'd like to get this PR merged first, before merging #505.

This test could be added to CI (it takes about 9 seconds to run), but for now, just run it manually with no arguments. It does not require running a zcashd instance (since it uses the darkside wallet test infrastructure). It does require:

  • grpcurl
  • jq (but this dependency could be eliminated pretty easily).

@LarryRuane LarryRuane added enhancement New feature or request testing labels Feb 27, 2025
@LarryRuane LarryRuane self-assigned this Feb 27, 2025
@LarryRuane
Copy link
Copy Markdown
Collaborator Author

Force pushed to add copyright comment to new file smoke-test.bash.

@LarryRuane
Copy link
Copy Markdown
Collaborator Author

The following files are generated, so don't need review:

  • walletrpc/darkside.pb.go
  • walletrpc/darkside_grpc.pb.go
  • docs/rtd/index.html

@LarryRuane
Copy link
Copy Markdown
Collaborator Author

Force pushed to test donation address (#506 just merged)

Copy link
Copy Markdown
Contributor

@y4ssi y4ssi left a comment

Choose a reason for hiding this comment

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

utACK, but suggest improving dependency documentation in smoke-test.bash

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The script relies on external tools (grpcurl, jq, curl, timeout), but it doesn't explicitly document installation or pre-checks.

Suggestions:

  1. Add a "Requirements" section at the top listing dependencies and installation commands (e.g., apt-get install grpcurl jq curl).
  2. Include a pre-check to verify dependencies before execution:
    command -v grpcurl >/dev/null 2>&1 || { echo "Error: grpcurl not installed."; exit 1; }
  3. Improve error handling to provide clearer messages when dependencies are missing.

More tests could be added later; this covers the basics.
@LarryRuane LarryRuane merged commit a9e47fd into zcash:master Mar 10, 2025
3 checks passed
@LarryRuane LarryRuane deleted the 2025-02-smoke-test branch March 10, 2025 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants