Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Since the 'administer fields' permission is introduced, the FieldReplacementUI test fails.
Comment | File | Size | Author |
---|---|---|---|
#77 | title-n2813673-77.patch | 20.56 KB | DamienMcKenna |
| |||
#77 | title-n2813673-77.interdiff.txt | 1.1 KB | DamienMcKenna |
#56 | title-n2813673-56.patch | 392 bytes | DamienMcKenna |
#27 | title-test_fixes-2813673-27.patch | 1.31 KB | plach |
#15 | title-test_fixes-2813673-15.patch | 5.86 KB | plach |
|
Comments
Comment #2
Stevel CreditAttribution: Stevel commentedThis patch adds the needed permission to the user created by the test.
Comment #3
PolHi,
This patch make sense indeed.
Shouldn't we also update the info file of the module if we do this change ?
Thanks!
Comment #4
Stevel CreditAttribution: Stevel commented@Pol, I don't think the info file needs updating. The test continues to work under older versions of Drupal.
Comment #5
PolThis patch is, according to me, valid.
I'm struggling to fix the tests, when this patch is included, I'm down to 13 fails only. (300 passes, 13 fails, 0 exceptions, and 103 debug messages)
A little help would be very welcome!
Comment #6
jyraya CreditAttribution: jyraya commented@Pol,
I tested this patch with Drupal 7.52, 7.53 and the dev version against the latest title dev version. I get a full green.
Could you please confirm that you still have problems?
Otherwise, could we try to close this ticket as soon as possible because other patches on other issues get failed tests for no reason directly related to their scope; what slow down the acceptance process.
Comment #7
PolHi,
I think this ticket should be committed ASAP to the module.
I wrote the maintainer to see how we could speed up things.
I'll let you know when I get a reply.
Thanks!
Comment #8
dxvargas CreditAttribution: dxvargas commentedI confirm this patch works and I also had the confirmation from @Pol.
Here are the versions we used:
Drupal: 7.53
Title: 7.x-1.0-alpha8+0-dev
Entity: 7.x-1.8
Entity translation: 7.x-1.0-beta5
Before the patch:
*281* passes, *30* fails, 0 exceptions, and 98 debug messages
After the patch:
*311* passes, *0* fails, 0 exceptions, and 104 debug messages
So we confirm the RTBC. Thanks @Stevel and @jyraya!
I will raise the Priority to Critical, because this test is preventing another from being solved:
https://www.drupal.org/node/2757739 .
Comment #9
czigor CreditAttribution: czigor at Liip for FREITAG lab. AG commentedAs per https://www.drupal.org/node/45111 this is definitely not critical but agree that it should be committed. +1RTBC from here.
Comment #10
czigor CreditAttribution: czigor at Liip for FREITAG lab. AG commentedThis patch makes all tests green for me. It includes the patch in #2 as well.
Note that running the tests on a drupal install with an 'en' English url prefix breaks tests due to #2724773: Translation tests fail on site with english language prefix (global $language_url is not reset in tests).
Comment #11
PolHi,
Why these changes, tests are green with the patch from #2, what are the changes added in patch #10 ?
Thanks!
Comment #12
czigor CreditAttribution: czigor at Liip for FREITAG lab. AG commentedI'm testing with latest HEAD from drupal core, entity_translation and title and I get 13 fails with the patch in #2. The patch in #10 makes everything green.
@Pol: you said you got 13 fails as well, how did you fix that?
Comment #13
czigor CreditAttribution: czigor at Liip for FREITAG lab. AG commentedComment #14
PolHi,
Ok thanks for the clarification, I hope Plach will commit this asap.
Regarding the 13 fails, they are gone, check messages in #2757739: Token value is not sanitized, when replaced from title field.
Comment #15
plachThanks for your contributions, guys!
I'm seeing a few changes in the latest patch that are a bit concerning as they may imply an undesired behavior change. I'm going to commit the attached patch, that is making tests green here in my local environment. It's basically a few hunks from #10 plus some cosmetic / coding standard fixes. I'd suggest to review only https://www.drupal.org/files/issues/title-test_fixes-2813673-15.review.txt for the actual changes.
Let's see whether the bot is happy now. We can push more changes if something is still broken.
Comment #18
plachUnfortunately it seems we have DrupalCI issues atm, so I cannot tell whether this is fixed:
https://dispatcher.drupalci.org/job/default/298540/console
The patches here will no longer apply, so failures are expected, however not even branch tests are completing atm :(
Comment #19
czigor CreditAttribution: czigor at Liip for FREITAG lab. AG commentedNow locally I get this test result for HEAD:
Admin settings 16 passes, 25 fails, 0 exceptions, and 5 debug messages
Field replacement 87 passes, 83 fails, 0 exceptions, and 37 debug messages
Replaced fields translation 38 passes, 67 fails, 19 exceptions, and 13 debug messages
Comment #20
PolWith Entity Translation:HEAD ?
Comment #21
czigor CreditAttribution: czigor at Liip for FREITAG lab. AG commented@Pol Still everything on HEAD, yes. But found out that on the web UI tests pass, on CLI they fail.
Comment #22
PolCould you try again with this patch applied too ? #2724773: Translation tests fail on site with english language prefix (global $language_url is not reset in tests)
Comment #23
plachI have all green with the latest -dev versions of Drupal core, ET, Entity and Title. Both via run-tests.sh and UI.
Let's wait for the bot to see whether at least he's happy.
I suspect that due to the way tests are written right now, they may somehow be affected by the host installation.
Comment #24
czigor CreditAttribution: czigor at Liip for FREITAG lab. AG commented@Pol Yes, I was using the patch from #2724773: Translation tests fail on site with english language prefix (global $language_url is not reset in tests).
Comment #25
Polmmmh... running out of idea :(
Comment #26
PolTests are green here: https://drive.google.com/file/d/0B7ugUjBv1lqHc05teHk1NFhfNUU/view?usp=dr...
Comment #27
plachActually branch tests are failing but with different numbers than #19. From looking at the errors I suspect this has something to do with the installation profile. Let's try the attached patch.
Comment #29
joseph.olstadfor possible hints to fix this for the title module tests, see
entity_translation
git diff 0cd07cf4769a92 a8ae1e78c57c6
Comment #30
DamienMcKennaMinor changes to the setUp() methods.
Oddly enough, all of the tests pass locally, but they still fail on drupalci trying to enable the modules.
Comment #31
joseph.olstadTry changing:
to:
Comment #32
DamienMcKennaThe fact that so many of the setUp() methods are failing when just enabling the modules is kind of messed up :-\ I need to check the console output.
Comment #33
DamienMcKennaI wonder if we need to get the test dependencies committed first, then work on the tests themselves?
Comment #34
DamienMcKennaLets split the tests into pieces so they're individually easier to maintain. Also, lets list the dependencies required for the tests.
Comment #35
DamienMcKennaThe tests still pass locally.
I don't suppose a maintainer could test this locally and then commit it? :) I'm happy to help get this issue finished but I think we've hit an infrastructure problem.
Comment #36
Stevel CreditAttribution: Stevel commentedThe dependencies should also be listed in the getInfo() method, so that the tests are skipped when these modules are not available (e.g. in local testing).
Also, testbot installs drupal/modules/dependencies before applying the patch, so yes, to run the tests, the dependencies have to be committed first.
Comment #37
DamienMcKennaThis updates getInfo() with the dependencies lines, where appropriate.
Comment #39
Stevel CreditAttribution: Stevel commentedTitleAdminSettingsTestCase probably needs to load the taxonomy module in setUp(), since a permission from it is used. That should fix at least most of the errors.
Comment #40
joseph.olstadComment #41
joseph.olstadComment #43
joseph.olstadnot sure why my patch is so much bigger than 37..
Comment #44
joseph.olstadComment #47
joseph.olstadComment #48
joseph.olstadnew patch
Comment #50
joseph.olstadok, I think this might help.
Comment #51
joseph.olstadin 2016 I fixed similar issue in webform_localization by re-ordering the modules in setUp.
taxonomy should come last so that it actually gets installed first.
Comment #52
joseph.olstadComment #53
DamienMcKennaStill the same number of errors. Putting the cleaner code back.
Comment #54
DamienMcKennaSame results, as expected.
Lets go back to the step we know we need - this adds the test dependencies to the info file.
Comment #55
DamienMcKennaDuh, don't need to list taxonomy as a test dependency X-)
Comment #56
DamienMcKennaOne other small tweak - there's no need to list title.module as a files[] line as there are no classes defined in it.
Comment #57
joseph.olstadtaxonomy , why?
Comment #58
joseph.olstadThere's a module called https://www.drupal.org/project/taxonomy_access_fix
Comment #60
DamienMcKennaI'm working on getting the drupalci test suite to run locally so I can confirm whether committing #56 will solve the initial problems.
Comment #61
joseph.olstadDo this, will probably help the permissions issues. do this right before drupalCreateUser
Comment #62
DamienMcKennaI really don't think that matters, given that the tests work a-ok locally.
Comment #63
DamienMcKennaJust to be clear - it doesn't matter what we do with permissions, etc if the modules aren't being enabled correctly, that's the source of the problems.
Comment #65
plachCommitted and pushed #56, thanks for your efforts here, hugely appreciated!
Comment #71
plachWhoo-hoo, tests are passing again! Awesome work!
https://www.drupal.org/node/11063/qa
Comment #72
DamienMcKennaThanks. I'd still like to get the other test refactoring included, so here's that patch.
Comment #73
DamienMcKennaAll green, now that's more like it :)
Comment #74
plachTitleTranslationTestCase.test
is missing from the patch.Aside from that, is there any actual change to the test code? If not can we have a simple rename patch? You may need to add the following lines to your git config:
Comment #75
DamienMcKennaWhoops! Thanks for noticing the missing file.
This patch makes a few changes:
Comment #76
plachWhy are we adding these dependencies?
Comment #77
DamienMcKennaGood question. I'm not sure =) Must have been a copy/paste mistake.
This removes the unnecessary dependencies from that one test.
Comment #79
plachCommitted and pushed, thanks!
Comment #80
DamienMcKennaWoohoo, thanks!