hashgraph / hedera-services

Crypto, token, consensus, file, and smart contract services for the Hedera public ledger
Apache License 2.0
313 stars 136 forks source link

test: add test to ensure immutable contracts cannot be changed #15092

Closed lukelee-sl closed 2 months ago

lukelee-sl commented 2 months ago

Description Increase test coverage for ContractUpdate

codacy-production[bot] commented 2 months ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for de34f1ca79a8dbc4faa88eb0321e4048714f2dbb[^1] :white_check_mark: 71.43%
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (de34f1ca79a8dbc4faa88eb0321e4048714f2dbb) | Report Missing | Report Missing | Report Missing | | | Head commit (6b7a2ec9e7467a974903e3dc592c24db4ab8b258) | 110883 | 69259 | 62.46% | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#15092) | 7 | 5 | **71.43%** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more [^1]: Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 14.28571% with 6 lines in your changes missing coverage. Please review.

Project coverage is 59.10%. Comparing base (964661d) to head (6b7a2ec). Report is 22 commits behind head on develop.

Files Patch % Lines
.../contract/impl/handlers/ContractUpdateHandler.java 14.28% 3 Missing and 3 partials :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15092/graphs/tree.svg?width=650&height=150&src=pr&token=ZPMV8C93DV&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph)](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15092?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) ```diff @@ Coverage Diff @@ ## develop #15092 +/- ## =========================================== Coverage 59.10% 59.10% + Complexity 22549 22543 -6 =========================================== Files 2902 2897 -5 Lines 111299 111194 -105 Branches 11424 11411 -13 =========================================== - Hits 65783 65723 -60 + Misses 41827 41784 -43 + Partials 3689 3687 -2 ``` | [Files](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15092?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) | Coverage Δ | | |---|---|---| | [.../contract/impl/handlers/ContractUpdateHandler.java](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15092?src=pr&el=tree&filepath=hedera-node%2Fhedera-smart-contract-service-impl%2Fsrc%2Fmain%2Fjava%2Fcom%2Fhedera%2Fnode%2Fapp%2Fservice%2Fcontract%2Fimpl%2Fhandlers%2FContractUpdateHandler.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph#diff-aGVkZXJhLW5vZGUvaGVkZXJhLXNtYXJ0LWNvbnRyYWN0LXNlcnZpY2UtaW1wbC9zcmMvbWFpbi9qYXZhL2NvbS9oZWRlcmEvbm9kZS9hcHAvc2VydmljZS9jb250cmFjdC9pbXBsL2hhbmRsZXJzL0NvbnRyYWN0VXBkYXRlSGFuZGxlci5qYXZh) | `67.30% <14.28%> (-2.18%)` | :arrow_down: | ... and [26 files with indirect coverage changes](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15092/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph) [![Impacted file tree graph](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15092/graphs/tree.svg?width=650&height=150&src=pr&token=ZPMV8C93DV&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph)](https://app.codecov.io/gh/hashgraph/hedera-services/pull/15092?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hashgraph)