Problem/Motivation
While testing the upgrade path we are encountering different issues or scenario's that would be really nice to have test for. To make sure the upgrade path is really stable, we should add tests for a bunch of different scenario's..
Proposed resolution
Create fixtures for a bunch of different scenario's and test the upgrade path against all of them.
Remaining tasks
- Define the scenario's
- Create the fixtures
- Make sure the tests are passing for all of them
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 2915738-8.patch | 336.49 KB | woprrr |
| #7 | 2915738-7.patch | 547.81 KB | woprrr |
| #4 | 2915738-2.patch | 221.42 KB | marcoscano |
Comments
Comment #2
seanbOne of the scenario's we should test is #2916788: system_update_8402 does not affect media entities
Comment #4
marcoscanoThis patch is @phenaproxima's work from https://www.drupal.org/node/2915738#comment-12296884. It includes a requirements test, as well as a new fixture.
My review while testing it is:
If I understand correctly, this test assumes a codebase in a state that matches the fixture (drupal-8.3.7-media-suite). Can't we try to avoid that? It will quickly start to get very difficult to manage that while running tests. (By the way, I'm not sure if it's possible at all)
In other words, if you are running this test in a codebase with
media_entity_instagram2.x, the assertwill fail.
However, if we are running tests that use the fixture 8.4 (that assumes different codebases), we'll need to update the codebase before running the test.
Comment #5
marcoscanoRepurposing this to be more generic.
In https://www.drupal.org/project/media_entity/issues/2923400#comment-12357373 new tests were added to Media Entity 2.x to test upgrade scenarios, but we agreed there that the best place for them was in their own issue. So this is the one! Let's continue the conversation here.
Comment #6
woprrr commentedI will continue work on it and phenaproxima test can be easily associated with https://www.drupal.org/project/media_entity/issues/2923400#comment-12357373 tests. Can we consider to prepare a suite of DataProvider applicable on each providers (eg: UpgradeTestBase) and add one test in that suite by provider to add more module specific things. The Goal of this is to increase readability/following of each tests we need to write.
In each case we should process in setUp() the load of fixture before updb and then fire updb to test if our UX have survived ? Or we just need to add provider module and then test it individualy in media core context ?
In 2923400 I have purposed a createMedia() very abstract method to be used in ALL tests contexts.
Comment #7
woprrr commentedHi there,
I worked a lot on that issue last days to reproduce and continue/merge all tests write here and #2923400: Source data for Image media entities lost during upgrade to core's Media module. First step to continue these tests we need to update the media suite fixture provided by @marcoscano to have a real revelant tests on top of 8.4. I attach a patch with the fixture updated (in same state/modules activated) with small contents added to be sure media with provider properly survive to upgrade path.
I have already talk a lot in media slack about somes troubles encountered during this update/upgrade with specific additional modules (entity browser / dropzonejs).
My first feedback :
Modules inside media suite tests (fixture).
This Scenario are referenced as Scenario 14 in "2880334 Media Entity upgrade path testcases" sheet.
Before upgrade installed in fixture:
Warning : Do not forget to download blazy/slick libraries first.
Composer friendly format :
To Upgrade the media suite needed modules :
Composer friendly format :
I will continue the TESTS part today.
Comment #8
woprrr commentedSorry problems during compress of fixture and exclude Mac os extensions.