Closed (fixed)
Project:
Migrate Plus
Version:
8.x-3.x-dev
Component:
Plugins
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
4 Jul 2016 at 19:08 UTC
Updated:
9 May 2017 at 19:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
heddnI created the beast, it is only fitting I provide even the most basic of tests.
Comment #3
heddnI've added #2826636: Add non basic tests for entity lookup/generate plugins so we can start adding some more complex tests. Let's get a simple test case in first and start adding to that base.
Comment #4
mikeryanCopypasta from an ERR test?
We could use embedded_data and avoid creating a custom source plugin. For that matter, we could create the migration definition as an array within the test and avoid having a test module at all.
s/migration/entity_generate/
More ERR copypasta, I assume.
Comment #5
heddnComment #6
heddnComment #7
james.williamsThis is working for me, what's left to do here? The follow-up #2826636: Add non basic tests for entity lookup/generate plugins can cover edge cases (such as #2787219: Entity lookup plugin not able to guess config for entity types without bundle perhaps), so maybe the latest patch here can be committed?
Comment #8
heddn@james.williams all we are looking for is RTBC. As a first step.
Comment #9
james.williamsAh ok! I thought there might have been some further work required. As for the tests, they look like a good first step to me, just to show it the basic functionality works. I could well have missed something, but I'd be confident enough to say RTBC.
Comment #10
james.williamsOh actually ... gosh how many times do you think of something just after pressing submit ... this test covers creating new entities, but not updating existing ones.
We currently test entity_generate for two rows, let's make one match an existing entity to show that gets updated (e.g. rather than created as a duplicate).
And then can we add another field to use entity_lookup on similarly - to match one existing term to get updated, and another that won't match that will therefore get passed over?
Comment #11
heddnI think this addresses the comments in #10.
Comment #13
heddnComment #14
heddnWrong branch selected. Tests now pass.
Comment #15
heddnComment #17
mikeryanCommitted, thanks!