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: add an integration test for TestStoreAndInstantiateContract #79

Merged
merged 11 commits into from
Aug 23, 2023

Conversation

da1suk8
Copy link
Member

@da1suk8 da1suk8 commented Aug 17, 2023

Description

TestStoreAndInstantiateContract

This PR adds an integration test for StoreAndInstantiateContract.

This test is based on https://github.com/CosmWasm/wasmd/blob/33df4aeaaa419f6aad07b94d64c0423bee0a2d21/x/wasm/keeper/msg_server_integration_test.go#L553-L611

StoreAndInstantiate does not compare checksum(events[0].Attributes[0].Value) because the checksum is not exposed to the outside world.
See:

codeID, _, err := m.keeper.Create(ctx, senderAddr, msg.WASMByteCode, msg.InstantiatePermission)

Checklist:

  • I followed the contributing guidelines and code of conduct.
  • I have added a relevant changelog to CHANGELOG.md
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.
  • I have updated API documentation client/docs/swagger-ui/swagger.yaml

This is the same as x/wasm/keeper/testdata/reflect.wasm
@da1suk8 da1suk8 self-assigned this Aug 17, 2023
@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Merging #79 (dac543d) into main (f1e3820) will increase coverage by 0.23%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #79      +/-   ##
==========================================
+ Coverage   62.95%   63.18%   +0.23%     
==========================================
  Files          80       80              
  Lines        9965     9965              
==========================================
+ Hits         6273     6296      +23     
+ Misses       3369     3343      -26     
- Partials      323      326       +3     

see 1 file with indirect coverage changes

@da1suk8 da1suk8 force-pushed the test/TestStoreAndInstantiateContract branch from cf149a8 to 2b61346 Compare August 17, 2023 00:54
@da1suk8 da1suk8 marked this pull request as ready for review August 17, 2023 01:07
@da1suk8 da1suk8 requested a review from 170210 August 17, 2023 01:07
@da1suk8 da1suk8 changed the title test: add TestStoreAndInstantiateContract test: add an integration test for TestStoreAndInstantiateContract Aug 17, 2023
170210
170210 previously approved these changes Aug 17, 2023
@da1suk8 da1suk8 requested a review from 170210 August 18, 2023 04:39
170210
170210 previously approved these changes Aug 18, 2023
Kynea0b
Kynea0b previously approved these changes Aug 18, 2023
170210
170210 previously approved these changes Aug 23, 2023
Kynea0b
Kynea0b previously approved these changes Aug 23, 2023
@da1suk8 da1suk8 dismissed stale reviews from Kynea0b and 170210 via 42abd42 August 23, 2023 02:27
da1suk8 and others added 2 commits August 23, 2023 11:27
@da1suk8 da1suk8 merged commit 9655114 into Finschia:main Aug 23, 2023
12 checks passed
@da1suk8 da1suk8 deleted the test/TestStoreAndInstantiateContract branch August 23, 2023 06:31
@zemyblue zemyblue mentioned this pull request Oct 19, 2023
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.

3 participants