Problem/Motivation

Bug A (code):
#3051252: Upgrade path for Multiupload Filefield Widget and Multiupload Imagefield Widget has added multiupload_filefield_widget and multiupload_imagefield_widget moduels to the Drupal 7 migration test database fixture, but the addition made in the fixture file's system table defined that these modules are placed into the sites/all/modules/contrib directory.

This breaks the consistency with other modules (all of the other contributed modules are placed into sites/all/modules) , and also conflicts with the documentation: Generating database fixtures for migration tests.

Bug B (documentation):
The documentation above is very outdated in case of the Drupal 7 fixture: it requires more contributed modules (this was also missed in #3051252: Upgrade path for Multiupload Filefield Widget and Multiupload Imagefield Widget).

Steps to reproduce

Follow steps of Generating database fixtures for migration tests.

Proposed resolution

Bug A (code):
Fix the location of multiupload_filefield_widget and multiupload_imagefield_widget.

Bug B (documentation):
Update the documentation.

Remaining tasks

  1. Patch
  2. Doc update

User interface changes

Nothing.

API changes

Nothing.

Data model changes

Nothing.

Release notes snippet

Nothing needed.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

huzooka created an issue. See original summary.

huzooka’s picture

Status: Active » Needs work
huzooka’s picture

Assigned: huzooka » Unassigned
Issue summary: View changes
Status: Needs work » Needs review

Updated the documentation, so from now, https://www.drupal.org/node/2583227/revisions/12292117/view contains the new modules.

The patch also should be fine.

quietone’s picture

The D7 fixture needs more work than this one fix and I think we should make them all in one issue. I started in #3024459: Fix D7 test fixture which I postponed on an issue that was one of the last issues (if not the last at the time) that was changing the fixture but it doesn't need to be postponed.

huzooka’s picture

@quitone, I agree that the fixture needs more work, but:

  1. This is basically a follow-up for #3051252: Upgrade path for Multiupload Filefield Widget and Multiupload Imagefield Widget.
  2. Fixes an inconsistency in test data.
  3. Passes test (obviously).
  4. It's very tightly scoped: the patch changes two lines.
  5. Makes the DB fixture align with a preexisting doc that was probably missed.

I don't see any cons why this shouldn't or cannot be fixed now.

quietone’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +migrate-d7-d8

@huzooka, fair enough. The changes in the related issue are somewhat different. If/when you notice other problems with the d7 fixture, can you note them in #3024459: Fix D7 test fixture?

larowlan’s picture

Status: Reviewed & tested by the community » Needs review

Is there anyway we can write a test case that checks the location of the fixtures is correct?

Wim Leers’s picture

Status: Needs review » Reviewed & tested by the community

Do we really need test coverage for this honest tiny mistake? @huzooka already updated the official docs over at https://www.drupal.org/node/2583227.

It is increasingly unlikely that we add more contrib modules, so it's not really worth adding explicit test coverage for this IMHO: the ROI is tiny.

The process for adding more contributed modules to the Drupal 7 DB fixture is already explicitly documented at https://www.drupal.org/node/2583227, where the whole fixture creation/updating process is thoroughly documented. It says:

c. Install the following contributed modules to sites/all/modules of your Drupal 6 / Drupal 7 installation.

That's all this oversight is fixing :) I think tests are overkill here, because then we'll be testing the test fixture 🙃 If we do that, then we probably want more tests of the fixture?

Gently pushing back here — if you really want tests for this, I'll add them.

P.S.: In the past, when I wanted to add assert() statements to test infrastructure itself, it's always been shot down. So this would definitely be a very new pattern 🤓

quietone’s picture

I agree, there is absolutely no reason for a test. There are no more issues in the migration system for adding another contrib module to the test fixture.

huzooka’s picture

I think that nothing blocks this to be committed.

larowlan’s picture

I agree, there is absolutely no reason for a test. There are no more issues in the migration system for adding another contrib module to the test fixture.

Thanks, that makes sense to me @quietone, @Wim Leers

  • webchick committed 3bfedda on 9.3.x
    Issue #3213621 by huzooka: Fix D7 migration database fixture (to follow...

  • webchick committed 94cdf72 on 9.2.x
    Issue #3213621 by huzooka: Fix D7 migration database fixture (to follow...
webchick’s picture

Status: Reviewed & tested by the community » Fixed

Awesome sauce! Committed and pushed to 9.3.x, cherry-picked to 9.2.x. Thanks!

Status: Fixed » Closed (fixed)

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