Problem/Motivation

There doesn't seem to be test coverage for what happens to non-product content on the site as part of the migration.

Steps to reproduce

Run the Commerce v1 migration on Commerce Kickstart v2.

Proposed resolution

Add test coverage to ensure the non-product content is migrated properly

New test added, NodeTest that has assertions for some non product fields and terms.
Added field value assertions to ProductTest and ProductVariation test.

Remaining tasks

  • Write test coverage for the non-product nodes.
  • Write test coverage for the non-product terms.
  • Review

User interface changes

n/a

API changes

n/a

Data model changes

n/a

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

DamienMcKenna created an issue. See original summary.

quietone’s picture

Status: Active » Needs review
StatusFileSize
new23.12 KB

This adds a test of migrating nodes including testing field values. A field value test is also added to ProductTest and ProductVariationTest

Status: Needs review » Needs work

The last submitted patch, 2: 3166734-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

quietone’s picture

Status: Needs work » Needs review
StatusFileSize
new11.61 KB
new29.7 KB

I thought I ran ProductTest locally. Anyway, in order to test field value it needs to run more migrations, so those are added. I also added a helper method to Commerce1TestBase that creates dummy files.

quietone’s picture

StatusFileSize
new2.32 KB
new29.05 KB

Just cleaning up.

quietone’s picture

StatusFileSize
new2.2 KB
new29.66 KB

Now add assertions for non-product terms to the new NodeTest. I think that covers everything in the IS.

Anything more to do here?

quietone’s picture

Issue summary: View changes

  • quietone committed 5684f4d on 8.x-2.x
    Issue #3166734 by quietone: Add test coverage for Commerce v1 non-...

  • quietone committed dd1d28f on 8.x-2.x
    Revert "Issue #3166734 by quietone: Add test coverage for Commerce v1...
quietone’s picture

Reverted because tests fail with postgresql.

quietone’s picture

StatusFileSize
new4.83 KB
new30.75 KB

I don't think the order of the field value matters, so just change the test to order the values by target_id.

quietone’s picture

I am testing with postgres locally and the tests pass.

quietone’s picture

StatusFileSize
new2.15 KB
new30.78 KB

Some improvements but still can't get a failure locally.

quietone’s picture

That is better. I think this is ready to commit.

  • quietone committed d6fab3d on 8.x-2.x
    Issue #3166734 by quietone: Add test coverage for Commerce v1 non-...
quietone’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.