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

test: integration test storage-types #1762

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

peetzweg
Copy link
Contributor

@peetzweg peetzweg commented Apr 20, 2023

The origin of this PR is the need in the contracts-ui repo to have a contract to test the proper decoding and display of return values of an ink smart contract.

We currently have integration test using the mother contract, however, it's missing some possible types and is relying on inputs for some messages. Testing encoding and sending inputs to an ink! message is should be tested separately.

The original development of this contract happened in a pr for the ink-examples repo before I realised it was a mirror of ink/intergration-tests folder.

Related ink-examples PR: use-ink/ink-examples#15

Related contracts-ui PR: use-ink/contracts-ui#470

cc @statictype

@codecov-commenter
Copy link

codecov-commenter commented Apr 21, 2023

Codecov Report

Merging #1762 (e12ab8e) into master (fac0225) will decrease coverage by 0.02%.
The diff coverage is n/a.

❗ Current head e12ab8e differs from pull request most recent head 123c4d4. Consider uploading reports for the commit 123c4d4 to get more accurate results

@@            Coverage Diff             @@
##           master    #1762      +/-   ##
==========================================
- Coverage   70.86%   70.84%   -0.02%     
==========================================
  Files         207      207              
  Lines        6655     6655              
==========================================
- Hits         4716     4715       -1     
- Misses       1939     1940       +1     

see 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@statictype
Copy link
Contributor

Testing encoding and sending inputs to an ink! message is should be tested separately.

the approach of the Mother contract where it returns the input values was ok imo. it allows us to test the encoding of user inputs as well. why do you think it's a problem if we test them together?

integration-tests/storage-types/lib.rs Outdated Show resolved Hide resolved
integration-tests/storage-types/lib.rs Outdated Show resolved Hide resolved
@statictype
Copy link
Contributor

we could replace Mother with this. wdyt @agryaznov ?

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.

None yet

3 participants