Closed (fixed)
Project:
Drupal core
Version:
10.1.x-dev
Component:
phpunit
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Apr 2018 at 13:57 UTC
Updated:
25 May 2023 at 13:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
cilefen commentedComment #3
bhanuprakashnani commentedCreated the patch for the above issue. Please review and mention if any more changes are to be made. Thank you.
Comment #4
bhanuprakashnani commentedComment #5
cilefen commentedComment #6
josevitalsoutoFix for duplicate addresses found in the previous patch.
Comment #8
cilefen commentedWhy are tests changing in this issue? Some of those are “http” for a reason.
Comment #9
prashant.c@cilefen
Tried to figure out the links which were intentionally http.
Re-submitting the patch with interdiff.
Comment #10
josevitalsoutoI think it's good to keep the http protocol here, as it's a protocol test:
Comment #12
yogeshmpawarComment #13
yogeshmpawarLets see patch passes all tests or not, changes addressed mentioned in comment #10 & attached interdiff also.
Comment #14
yogeshmpawartriggering bots.
Comment #16
yogeshmpawarSorry, my bad was added interdiff as a patch. hope this patch will pass the tests.
Comment #19
cilefen commentedI am not at all sure what bug this issue intends to fix. I am putting it on hold until the issue summary is updated with an explanation of what is broken in the test code that appears in patches posted so far.
Comment #21
drummIt looks like all the remaining links to
http://www.drupal.orgare only in test code, which users do not see or click on. We do need to testhttp://, in URL generation since the web is far from 100% https.The protocols of each test should stay the same. It might be best to use example.org for tests, instead of drupal.org, to make it clear that the domain is not relevant.
Comment #22
longwaveThere are two links in system.install that look like they need updating:
These seem to redirect to the D7 handbook, so assuming there is a D8 equivalent this probably needs updating too.
Comment #27
quietone commentedRe #22. There is an issue to fix those the links in system module, #3002983: Convert http links to https at system module. Therefor changing this issue to change the drupal.org links in test to example.com as suggested in #21.
Comment #28
quietone commentedDivided this into several steps as follows:
$ grep -r http://drupal.org core | egrep Test.*.php | awk -F: '{print $1}' | sort -u | nl1 core/modules/migrate/tests/src/Kernel/process/DownloadTest.php - Do not change, downloads https://www.drupal.org/favicon.ico
2 core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php - Do not change, uses https://www.drupal.org/favicon.ico
3 core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php - Changed
4 core/modules/views/tests/src/Functional/Plugin/DisplayTest.php - Changed
5 core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php - Do not change, in comment.
6 core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaDeprecationTest.php - Do not change, part of deprecation message
7 core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php - Changed
$ grep -r https://drupal.org core | egrep Test.*.php | awk -F: '{print $1}' | sort -u | nl1 core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTestBase.php - Changed
2 core/tests/Drupal/KernelTests/Core/Http/LinkRelationsTest.php - Fails if changed.
3 core/tests/Drupal/KernelTests/Core/Updater/UpdaterTest.php - Do not change, in comment.
grep -r http://www.drupal.org core | egrep Test.*.php | awk -F: '{print $1}' | sort -u | nl1 core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php - Changed
2 core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php - Changed
3 core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php - TODO
4 core/modules/migrate_drupal/tests/src/Traits/CreateTestContentEntitiesTrait.php - Changed
5 core/modules/views/tests/src/Functional/Handler/FieldWebTest.php - Changed
6 core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php - Changed
7 core/tests/Drupal/Tests/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidatorTest.php - Changed
This patch has the above changes.
Stll to do:
Any file listed above that is marked TODO. Changing https://www.drupal.org in tests, if any in an actual test. Most of these will be legitimate use in deprecation or comments.
Comment #29
abhijith s commentedPatch #28 applied cleanly on 9.2.x.
Comment #30
quietone commentedSince this is about tests, moving to phpunit.
Comment #33
vikashsoni commentedPatch #28 applied successfully in durpal-9.3.x-dev
Thanks for the patch
Comment #36
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #37
nikhil_110 commentedRe-roll patch #28 for Drupal 10.1.x
Comment #38
rassoni commentedAddressed #37 fixed patch applied failed. #28 comments Found few new files address that accordingly.
grep -r http://drupal.org core | egrep Test\*.php | awk -F: '{print $1}' | sort -u | nlgrep -r https://drupal.org core | egrep Test\*.php | awk -F: '{print $1}' | sort -u | nlgrep -r http://www.drupal.org core | egrep Test\*.php | awk -F: '{print $1}' | sort -u | nlComment #39
smustgrave commentedApplied patch and ran greps from #38 and every file not updated seems to be documented in #38 and #28.
Think this is good to go.
Comment #42
catchCommitted/pushed to 11.x and cherry-picked to 10.1.x, thanks!
I did wonder briefly about the update module tests which are faking Drupal.org data, but it's still example data and it's easier not to have exceptions.