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

Updated mock creation in unit tests to avoid unexpected test breaks #759

Merged
merged 5 commits into from
Nov 21, 2023

Conversation

ericleponner
Copy link
Collaborator

@ericleponner ericleponner commented Nov 20, 2023

Description:

Changes below impact unit tests only:

  1. Each call to new AdapterMock() is now followed by AdapterMock.restore()
  2. AdapterMock instantiated at global or describe() level are moved to test() / it() level
  3. Some unused imports have been removed
  4. ContractSourceAudit test now uses a mock for solc compiler list

Related issue(s):

None

Notes for reviewer:

It's probably better to review the three commits independently.

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@ericleponner ericleponner requested a review from svienot November 20, 2023 16:39
Copy link

github-actions bot commented Nov 20, 2023

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 87.35% 32852 / 37610
🔵 Statements 87.35% 32852 / 37610
🔵 Functions 66.83% 814 / 1218
🔵 Branches 83.54% 3645 / 4363
File CoverageNo changed files found.
Generated in workflow #562

Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 14 Code Smells

0.0% 0.0% Coverage
0.3% 0.3% Duplication

warning The version of Java (11.0.17) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@svienot
Copy link
Collaborator

svienot commented Nov 21, 2023

LG

@ericleponner ericleponner merged commit f2a6ce4 into main Nov 21, 2023
5 of 6 checks passed
@ericleponner ericleponner deleted the mock_adapter_restore branch November 21, 2023 14:06
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.

2 participants