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: Allow assertion of AddSchema results #2788

Merged

Conversation

AndrewSisley
Copy link
Contributor

Relevant issue(s)

Resolves #2766

Description

Allows assertion of AddSchema results.

PR Does not attempt to spread it's usage (out of scope).

@AndrewSisley AndrewSisley added area/schema Related to the schema system area/testing Related to any test or testing suite code quality Related to improving code quality labels Jun 27, 2024
@AndrewSisley AndrewSisley added this to the DefraDB v0.12 milestone Jun 27, 2024
@AndrewSisley AndrewSisley requested a review from a team June 27, 2024 19:46
@AndrewSisley AndrewSisley self-assigned this Jun 27, 2024
Copy link

codecov bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.79%. Comparing base (666e871) to head (1160308).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2788      +/-   ##
===========================================
- Coverage    78.84%   78.79%   -0.05%     
===========================================
  Files          315      315              
  Lines        23835    23835              
===========================================
- Hits         18792    18780      -12     
- Misses        3670     3677       +7     
- Partials      1373     1378       +5     
Flag Coverage Δ
all-tests 78.79% <ø> (-0.05%) ⬇️

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

see 15 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 666e871...1160308. Read the comment docs.

@AndrewSisley AndrewSisley force-pushed the 2766-assert-add-schema-result branch 2 times, most recently from 1401594 to da05e98 Compare June 27, 2024 20:28
Will be used for asserting AddSchema results too soon.  No code has changed, only moved (plus a copy/cast in getCollections).
Bit odd that this wasn't done before, not sure why
@AndrewSisley AndrewSisley force-pushed the 2766-assert-add-schema-result branch from da05e98 to 1160308 Compare June 28, 2024 15:45
AndrewSisley added a commit to AndrewSisley/defradb that referenced this pull request Jun 28, 2024
Copy link
Member

@nasdf nasdf left a comment

Choose a reason for hiding this comment

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

LGTM

@AndrewSisley AndrewSisley merged commit 30b40fd into sourcenetwork:develop Jun 28, 2024
38 of 39 checks passed
@AndrewSisley AndrewSisley deleted the 2766-assert-add-schema-result branch June 28, 2024 16:42

if expected.Indexes != nil || len(actual.Indexes) != 0 {
// Dont bother asserting this if the expected is nil and the actual is nil/empty.
// This is to say each test action from having to bother declaring an empty slice (if there are no indexes)
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo: This is to save? Same thing bellow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/schema Related to the schema system 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.

Allow integration tests to assert the return value of AddSchema
3 participants