-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Loading multiple yaml files with the same table name causes only the last one to be used. #76
Labels
Comments
Hi @ryanneufeld, thanks for opening this issue! I'm not sure what to think about this feature request. Although easy to implement, it feels wrong to me to have multiple files for the same table. Any reason on why you don't keep all records in the same file? |
Our use-case has a set of common data and then a set of test specific data
for the same tables.
This allows us to have a test suite sufficient enough to match our
production environment.
Consider a tree that looks like this:
````
├── common
│ ├── apilog.yml
│ ├── coupon.yml
│ ├── feature.yml
│ ├── invoice.yml
│ ├── invoice_lineitem.yml
│ ├── invoice_payment.yml
│ ├── package.yml
│ ├── package_feature.yml
│ ├── payment_processor.yml
│ ├── price_tier.yml
│ ├── service_grant.yml
│ ├── subscription.yml
│ ├── subscription_feature.yml
│ ├── subscription_flag.yml
│ ├── subscription_transaction.yml
│ ├── subscription_trial_state.yml
│ ├── subscription_upgrade.yml
│ ├── transaction_type.yml
│ └── user_feature.yml
├── expects
│ ├── intern
│ │ ├── features
│ │ │ └── TestIntegrationRead_1
│ │ │ └── feature.yml
│ │ └── subscriptions
│ │ └── TestIntegrationReadCollection_1
│ │ └── subscription.yml
│ └── legacy
│ └── method
│ └── intern
│ └── features
│ └── TestIntegrationRead_1
│ └── feature.yml
````
Where the directories are expects data that are loaded for the tests, and
added to the existing common data.
What I've done so far to work around it is to load each file in with
yaml.Unmarshall() and then use a template to combine them all. But it's
cumbersome and obfuscated.
…On Sun., Jul. 19, 2020, 17:17 Andrey Nering, ***@***.***> wrote:
Hi @ryanneufeld <https://github.com/ryanneufeld>, thanks for opening this
issue!
I'm not sure what to think about this feature request.
Although easy to implement, it feels wrong to me to have multiple files
for the same table. Any reason on why you don't keep all records in the
same file?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#76 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEO5BWUJKO3GNPVG7HHIF3R4OEITANCNFSM4OU4DSJQ>
.
|
+1. I need this feature too. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In our use-case we have some common test data that we want in a table named "feature" for example.
If we load multiple files named 'feature.yml' from multiple paths, only the data from the last one added is present.
Instead I would have expected the data from both files to be aggregated before being inserted.
The text was updated successfully, but these errors were encountered: