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 relation substitute mechanic to tests #2682

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

AndrewSisley
Copy link
Contributor

Relevant issue(s)

Resolves #2681

Description

Adds a relation substitute mechanic to tests, allowing us to not worry about doc ids in tests that don't need to care about the exact string.

Only converts a handful of tests to the new system, I don't think we should actively spend large chunks of time migrating to the new system - we can just write new tests using this where appropriate, and passively convert existing when convenient.

@AndrewSisley AndrewSisley added area/testing Related to any test or testing suite code quality Related to improving code quality labels Jun 4, 2024
@AndrewSisley AndrewSisley added this to the DefraDB v0.12 milestone Jun 4, 2024
@AndrewSisley AndrewSisley requested a review from a team June 4, 2024 14:37
@AndrewSisley AndrewSisley self-assigned this Jun 4, 2024
@AndrewSisley AndrewSisley changed the title tests: Add relation substitute mechanic to tests test: Add relation substitute mechanic to tests Jun 4, 2024
Copy link

codecov bot commented Jun 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.24%. Comparing base (cbb3f23) to head (5546082).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2682      +/-   ##
===========================================
+ Coverage    78.16%   78.24%   +0.08%     
===========================================
  Files          303      303              
  Lines        22996    22996              
===========================================
+ Hits         17973    17991      +18     
+ Misses        3663     3649      -14     
+ Partials      1360     1356       -4     
Flag Coverage Δ
all-tests 78.24% <ø> (+0.08%) ⬆️

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

see 7 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

Copy link
Collaborator

@fredcarle fredcarle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This will be convenient :)

@AndrewSisley AndrewSisley merged commit da3d057 into sourcenetwork:develop Jun 4, 2024
33 of 35 checks passed
@AndrewSisley AndrewSisley deleted the 2681-test-rel-sub branch June 4, 2024 15:37
ChrisBQu pushed a commit to ChrisBQu/defradb that referenced this pull request Feb 21, 2025
## Relevant issue(s)

Resolves sourcenetwork#2681

## Description

Adds a relation substitute mechanic to tests, allowing us to not worry
about doc ids in tests that don't need to care about the exact string.

Only converts a handful of tests to the new system, I don't think we
should actively spend large chunks of time migrating to the new system -
we can just write new tests using this where appropriate, and passively
convert existing when convenient.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Related to any test or testing suite code quality Related to improving code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce substitution mechanic for relations in tests
2 participants