Problem/Motivation
follow up to #3100386: Create contrib update module test cases that use semantic versioning
\Drupal\Tests\update\Functional\UpdateCoreTest mostly has test methods that deal with updates to the core Drupal project has it's name implies.
Certain test methods such as \Drupal\Tests\update\Functional\UpdateCoreTest::testLocalActions() are just general update module tests.
Proposed resolution
Move test methods from \Drupal\Tests\update\Functional\UpdateCoreTest that don't deal with Drupal core update releases to their own class.
Remaining tasks
Review MR 1358, https://git.drupalcode.org/project/drupal/-/merge_requests/1358
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | raw_diff_MR1358-MR2255.txt | 775 bytes | spokje |
Issue fork drupal-3127177
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
Comment #2
tedbowComment #8
kunal.sachdev commentedComment #10
tedbow@kunal.sachdev this is looking good but I think we can move a few more methods over.
The following methods in
UpdateSemverCoreTestto require a core version to be set but they don't really test which version is recommended for core they just need something set so they can test regular functionality(non core specific) so they should also be moved toUpdateTestThe problem is that all these methods use
$this->setProjectInstalledVersion('8.0.0');andsetProjectInstalledVersionis defined inUpdateSemverTestBase. We can solve this by not callingsetProjectInstalledVersion()and instead just doingIn
\Drupal\Tests\update\Functional\UpdateTest::setUp()Comment #11
kunal.sachdev commentedComment #12
tedbowThis looks good. Assuming it passes tests RTBC!
Comment #13
quietone commentedThe new UpdateMiscTest class contains 4 tests about the ModulePage, (testModulePageRunCron, testModulePageSecurityUpdate, testModulePageRegularUpdate, testModulePageUpToDate). Would they be better off and easier to find in their own file?
Comment #14
quietone commentedThis needs to be on 10.0.x, changing version. Also, tests are not running, maybe needs a rebase, adding reroll tag.
Comment #15
spokjeComment #17
spokjeMR!2255 is currently MR!1358 1-on-1 against
10.0.x-devAttached raw_diff between the 2 MRs
Comment #18
spokjeMoved Module Page related tests to a new separate Test Class (addressing #14)
Comment #20
smustgrave commentedRebased for 10.0.x. May need to update MR for 10.1.x
but lets see if there is green.
Comment #21
smustgrave commentedAppears to have test failures.
Comment #22
spokjeI think @smustgrave is right and this should be targeting 10.1.x now.
Comment #25
spokjeClosed the 10.0.x MR and opened a new 10.1.x MR.
Rebasing was a nightmare and there were no comments on the old MR anyway.
Comment #26
spokjeComment #27
smustgrave commentedI see all green now. https://git.drupalcode.org/project/drupal/-/merge_requests/3042 appears to be good to merge so feel comfortable marking
Comment #28
spokjeComment #29
xjmThanks everyone for working on this and for trying to update it for 10.1.x.
The issue title says that the issue will move test methods, but nothing is being moved in the current MR. Instead, the methods are just being copied, and are still present in
UpdateSemverCoreTestafter the MR is applied.Can we correctly move them as the issue summary and title describe, and also verify that nothing else from the original MR has gone missing in the process? It's always important to check the diffstat and read the whole change set when resolving merge conflicts. Thanks!
Comment #31
quietone commentedRebase the old MR to 11.x and then moved the functions. Review MR 1358
Comment #34
smustgrave commentedBunch of super small stuff. Probably find to self RTBC after that.
Comment #35
quietone commentedThe latest changes were to apply suggestions for adding void returns to new methods. So, I am setting to RTBC per #34.
Comment #37
catchCommitted/pushed to 11.x and cherry-picked to 10.3.x, thanks!