Skip to content

Fix errors in package index project data unit tests for discoveryDependencies #292

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

Merged
merged 2 commits into from
Nov 11, 2021
Merged

Fix errors in package index project data unit tests for discoveryDependencies #292

merged 2 commits into from
Nov 11, 2021

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Nov 11, 2021

In preparation for linting a project, Arduino Lint collects information that may be needed by multiple rules, referred to as "project data".

For package index projects, this data includes the contents of the packages[].platforms[].discoveryDependencies[] field, stored in a slice along with identifiers.

At the time the code was added for collecting that project data, new assertions were added to the unit test tables to cover it, but the test table handling code was not updated, meaning the assertions were never tested.

This PR adds that missing test table handling code and also fixes some errors in the assertions that were revealed by testing them.

Assertions were added to the unit test tables for package index project data generation of pluggable discovery
dependencies. However, the test table handling code was not updated to use those assertions, so they were ignored.
There were some typos in the test tables data for the discoveryDependencies components of the package index project data
unit tests. Due to missing handling code for this part of the tables, the errors were not apparent. Once the handling
code was added, they caused spurious test failures, which are fixed here.
@per1234 per1234 added topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project labels Nov 11, 2021
@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2021

Codecov Report

Merging #292 (c547ee4) into main (1ffea34) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #292   +/-   ##
=======================================
  Coverage   89.79%   89.79%           
=======================================
  Files          44       44           
  Lines        6626     6626           
=======================================
  Hits         5950     5950           
  Misses        553      553           
  Partials      123      123           
Flag Coverage Δ
unit 89.79% <ø> (ø)

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


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1ffea34...c547ee4. Read the comment docs.

@per1234 per1234 merged commit cf9c369 into arduino:main Nov 11, 2021
@per1234 per1234 deleted the fix-discoverydependencies-tests branch November 11, 2021 14:45
@per1234 per1234 self-assigned this Nov 20, 2021
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: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants