Closed (fixed)
Project:
Drupal core
Version:
9.2.x-dev
Component:
migration system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
13 Jun 2020 at 06:26 UTC
Updated:
21 Dec 2020 at 03:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
quietone commentedDo you recall the reason for the failure? I would be surprised if it was because of the double slash.
And d7_file, d6_file and d7_file_private migrations add a slash.
Comment #3
benjifisherThe failure is typically caused by a missing file. It is not caused by the duplicated slash, but I see
//in the logged message.I am not sure that this is the right way to fix it, but the attached patch removes the
. '/'. Let's see what the testbot has to say.Comment #4
mikelutzI've gone back and forth on this 3 times now. Just do it. There is so much wrong with that code block that is all being worked on in #2925899: MigrateUpgradeImportBatch does not use source_private_file_path & source_base_path correctly, making it impossible to have public & private files in separate locations. That particular line seems minor, but it's obvoiusly wrong to have a trailing slash there when the migration definitely appends one, and it's far better to change the core batch UI form to match the migration than to change the migration itself.
Comment #6
mikelutzunrelated test failure
Comment #7
catchDo we not need test coverage for this one?
Comment #8
quietone commentedIn my opinion specific tests are not needed. The fact that both the Upgrade6Test and Upgrade7Test pass is sufficient in my mind.
Comment #10
quietone commentedWell, I suppose it can be tested like this.
Comment #12
asishsajeev commentedComment #13
asishsajeev commented#10 Patch applied successfully.
Comment #14
asishsajeev commentedComment #15
quietone commented@asishsajeev, thank you for setting this patch to RTBC, but having a patch apply successfully is only one of the criteria a patch must met in order to be RTBC. In this case, the patch in #10 adds a new test which needs to be reviewed. If you did that please add a comment explaining what you did to review the test. It takes a while to know the whole process and there is general information about reviews are in the handbook, there is a page about reviewing patches and there is a contributor page about patch review. Thx!
Comment #16
benjifisherNormally I do not review an issue where I have contributed a patch. In this case, my contribution (the non-test part of the patch) was approved in #6. I think it is OK for me to review the test.
Do we need all this?
I think we just need the line that sets
$db. Also,Database::setActiveConnection()returns the old value, so we could combine the first two lines if we did need them.Since
$dbis never used again, we could eliminate it. That would also remove the annoyance of the not-quite-aligned->operators.It looks as though this is mostly copied from IdConflictTest, and the assertions duplicate parts of that test. Can we get rid of the first
drupalGet()and everything involving$session?Comment #17
quietone commented@benjifisher, thanks.
Yes this was a copy/paste from another test file and I meant to come back and clean it up. Clearly I forgot. Sorry.
Comment #18
benjifisher@quietone, thanks for the quick response!
I think the patch looks good. If the testbot disagrees, then it can overrule me. ;)
Comment #19
alexpottRemvoed unused use on commit.
Comment #21
benjifisherOops. Thanks for catching that!