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

[TASK] Detect duplicate table records within importCSVDataSet() #481

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

sbuerk
Copy link
Collaborator

@sbuerk sbuerk commented Jul 28, 2023

The testing-frameworks provides the ability to read csv fixture
files to import database datasets. The internal DataSet::import()
implementation is provided by FunctionalTestCase->importCSVDataSet().

Sometimes duplicate rows with the same identifier (uid or hash)
are included in a csv dataset file which are overriden.

This change now checks during the dataseet import phase for these
duplicates and throw a exception stating the table and id value
to make the usage easier and helps with finding test-setup issues.

Note: assertCSVDataSet() counter part will not check for duplicates.

Resolves: #478
Releases: main, 7

@sbuerk sbuerk changed the title [TASK] Detect duplicate uid or hash records for DataSet::import() [TASK] Detect duplicate uid or hash records for importCSVDataSet() Jul 28, 2023
@sbuerk sbuerk changed the title [TASK] Detect duplicate uid or hash records for importCSVDataSet() [TASK] Detect duplicate table records within importCSVDataSet() Jul 28, 2023
The testing-frameworks provides the ability to read csv fixture
files to import database datasets. The internal `DataSet::import()`
implementation is provided by `FunctionalTestCase->importCSVDataSet()`.

Sometimes duplicate rows with the same identifier (`uid` or `hash`)
are included in a csv dataset file which are overriden.

This change now checks during the dataseet import phase for these
duplicates and throw a exception stating the table and id value
to make the usage easier and helps with finding test-setup issues.

Note: `assertCSVDataSet()` counter part will not check for duplicates.

Resolves: #478
Releases: main, 7
@sbuerk sbuerk merged commit 3600cc0 into main Jul 28, 2023
4 checks passed
@sbuerk sbuerk deleted the stefan-1 branch July 28, 2023 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check importCSVDataSet() uid's are unique?
2 participants