Skip to content

Conversation

@cmaglie
Copy link
Member

@cmaglie cmaglie commented Oct 19, 2023

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

Adds a mocked serial discovery to perform integration tests that require a working discovery.
The mocked discovery can be "implanted" with the command:

	cli.InstallMockedSerialDiscovery(t)

This command will replace the original serial discovery with the mocked one. There is no way to restore the original discovery, so tests that do not require the mocking should be written separately.

An integration test that demonstrates the usage has been added as well.

What is the current behavior?

What is the new behavior?

Does this PR introduce a breaking change, and is titled accordingly?

Other information

@cmaglie cmaglie self-assigned this Oct 19, 2023
@cmaglie cmaglie added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Oct 19, 2023
@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

Attention: 45 lines in your changes are missing coverage. Please review.

Comparison is base (1e51cdc) 62.82% compared to head (01e95f0) 62.77%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2376      +/-   ##
==========================================
- Coverage   62.82%   62.77%   -0.06%     
==========================================
  Files         204      205       +1     
  Lines       19311    19283      -28     
==========================================
- Hits        12132    12104      -28     
  Misses       6119     6119              
  Partials     1060     1060              
Flag Coverage Δ
unit 62.77% <68.30%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
commands/board/list.go 58.70% <100.00%> (ø)
commands/board/listall.go 91.13% <100.00%> (ø)
commands/compile/compile.go 66.78% <100.00%> (ø)
commands/core/download.go 57.14% <100.00%> (ø)
commands/core/install.go 71.42% <100.00%> (ø)
commands/core/list.go 86.95% <100.00%> (ø)
commands/core/search.go 84.21% <100.00%> (ø)
commands/core/uninstall.go 50.00% <100.00%> (ø)
commands/core/upgrade.go 80.64% <100.00%> (ø)
commands/debug/debug_info.go 66.86% <100.00%> (ø)
... and 19 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cmaglie cmaglie merged commit 710ecba into arduino:master Oct 19, 2023
@cmaglie cmaglie deleted the mock_serial branch October 19, 2023 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants