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: Specify which collection to update in test framework #601

Merged
merged 3 commits into from
Jul 7, 2022

Conversation

AndrewSisley
Copy link
Contributor

Relevant issue(s)

Resolves #572

Description

Specify which collection to update in test framework, and only update items from that collection.

Tasks

  • I made sure the code is well commented, particularly hard-to-understand areas.
  • I made sure the repository-held documentation is changed accordingly.
  • I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in tools/configs/chglog/config.yml).
  • I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ...

@AndrewSisley AndrewSisley added bug Something isn't working area/testing Related to any test or testing suite action/no-benchmark Skips the action that runs the benchmark. labels Jul 7, 2022
@AndrewSisley AndrewSisley added this to the DefraDB v0.3 milestone Jul 7, 2022
@AndrewSisley AndrewSisley requested a review from a team July 7, 2022 14:01
@AndrewSisley AndrewSisley self-assigned this Jul 7, 2022
@codecov
Copy link

codecov bot commented Jul 7, 2022

Codecov Report

Merging #601 (c24bb22) into develop (7e90fbb) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #601      +/-   ##
===========================================
- Coverage    56.37%   56.36%   -0.01%     
===========================================
  Files          121      121              
  Lines        14303    14303              
===========================================
- Hits          8063     8062       -1     
- Misses        5542     5543       +1     
  Partials       698      698              
Impacted Files Coverage Δ
db/collection.go 58.16% <0.00%> (-0.18%) ⬇️

Copy link
Member

@shahzadlone shahzadlone left a comment

Choose a reason for hiding this comment

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

Cheers for sorting this out! LGTM!

Not sure if this is a false alarm or it even matters but just bringing up because I saw this on codecov for db/collection.go:

image

@AndrewSisley
Copy link
Contributor Author

...codecov for db/collection.go:

It should only hit that line if searching for a field that don't exist, if the code cov changed there it will have been hit by a bad update.

Ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh I get it now lol, this is why I saw the docKey (field index=0) had been replaced by the bad update's field value 😆 Nice spot Shahzad, I'll change that func in a new PR as that is not wonderful (should be a try-get at a glance, or at least a panic/error...).

cid suggests a CID, which is not what this is
Makes the difference between documentIndex and collectionIndex more obvious
@AndrewSisley AndrewSisley force-pushed the sisley/fix/I572-update-test-clause branch from 4be092d to c24bb22 Compare July 7, 2022 14:37
@AndrewSisley AndrewSisley merged commit ef43456 into develop Jul 7, 2022
@AndrewSisley AndrewSisley deleted the sisley/fix/I572-update-test-clause branch July 7, 2022 14:50
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
…work#601)

* Rename collectionIndex

cid suggests a CID, which is not what this is

* Rename documentIndex

Makes the difference between documentIndex and collectionIndex more obvious

* Specify which collection to update in test framework

And only update that collection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/no-benchmark Skips the action that runs the benchmark. area/testing Related to any test or testing suite bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update property in test framework is applied to all documents with that index, regardless of collection
2 participants