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

chore: set CONTRACTS_NODE_PATH env variable for e2e tests #209

Merged
merged 13 commits into from
Jun 27, 2024

Conversation

AlexD10S
Copy link
Collaborator

Closes #31

As specified in the issue, implemented the flag --contracts-node with the path to the contracts-node binary to be used in the end-to-end (e2e) tests. This will allow pop to set the environment variable for the e2e tests as detailed here: https://use.ink/basics/contract-testing/end-to-end-e2e-testing

pop test contract  -p ./my_contract --features e2e-tests -n /Users/bruno/src/substrate-contracts-node/target/debug/substrate-contracts-node

Copy link

codecov bot commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 68.29268% with 13 lines in your changes missing coverage. Please review.

Project coverage is 70.05%. Comparing base (e95c42b) to head (a5ea458).
Report is 1 commits behind head on main.

@@            Coverage Diff             @@
##             main     #209      +/-   ##
==========================================
+ Coverage   68.55%   70.05%   +1.49%     
==========================================
  Files          44       44              
  Lines        6374     6596     +222     
  Branches     6374     6596     +222     
==========================================
+ Hits         4370     4621     +251     
+ Misses       1337     1236     -101     
- Partials      667      739      +72     
Files Coverage Δ
crates/pop-cli/src/commands/test/contract.rs 0.00% <0.00%> (ø)
crates/pop-contracts/src/test.rs 75.92% <71.79%> (+75.92%) ⬆️

... and 7 files with indirect coverage changes

Copy link
Collaborator

@Daanvdplas Daanvdplas left a comment

Choose a reason for hiding this comment

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

  • If I do pop test contract --features --help it doesn't display me which features there are. Would be nice it this could be provided.

README.md Outdated Show resolved Hide resolved
crates/pop-contracts/src/test.rs Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
crates/pop-cli/src/commands/test/contract.rs Outdated Show resolved Hide resolved
crates/pop-cli/src/commands/test/contract.rs Outdated Show resolved Hide resolved
crates/pop-cli/src/commands/test/contract.rs Show resolved Hide resolved
crates/pop-contracts/src/test.rs Outdated Show resolved Hide resolved
@AlexD10S
Copy link
Collaborator Author

  • If I do pop test contract --features --help it doesn't display me which features there are. Would be nice it this could be provided.

I noticed that too. I was unsure about including it in this PR, but based on your comment, it makes sense to fix it now.

@AlexD10S AlexD10S requested a review from Daanvdplas June 24, 2024 06:27
Copy link
Collaborator

@Daanvdplas Daanvdplas left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@evilrobot-01 evilrobot-01 left a comment

Choose a reason for hiding this comment

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

General observations.

crates/pop-cli/src/commands/test/contract.rs Outdated Show resolved Hide resolved
crates/pop-cli/src/commands/test/contract.rs Outdated Show resolved Hide resolved
crates/pop-contracts/src/test.rs Outdated Show resolved Hide resolved
@evilrobot-01 evilrobot-01 self-requested a review June 27, 2024 09:02
Copy link
Contributor

@evilrobot-01 evilrobot-01 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 item in the docs which I think was missed after the arg rename.

README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@evilrobot-01 evilrobot-01 left a comment

Choose a reason for hiding this comment

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

LGTM!

@AlexD10S AlexD10S merged commit 209024b into main Jun 27, 2024
14 of 15 checks passed
@AlexD10S AlexD10S deleted the alex/add-contracts-node-path branch June 27, 2024 19:35
@AlexD10S AlexD10S mentioned this pull request Jul 8, 2024
2 tasks
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.

Add CONTRACTS_NODE_PATH to Pop when running e2e tests for contracts
3 participants