Closed (outdated)
Project:
Examples for Developers
Version:
8.x-1.x-dev
Component:
Simpletest Example
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Sep 2015 at 18:27 UTC
Updated:
19 Feb 2023 at 02:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
isntall commentedI think this is something that will need to be looked at later, but for now we can simulate the same sort of behavior as qa.d.o.
Comment #3
isntall commentedTrying to use a symlink in pretty much the same manner as qa.d.o does still gave the same sort of results.
When we remove the check that ran the failing test we ran into another issue.
Drupal\cache_example\Tests\CacheExampleTestCase 25 passes 17 fails 7 exceptionsAllowed memory size of 419430400 bytes exhausted (tried to allocate 493 bytes)(this is already a raised number, where we have set the number to 320M)
The original issue I'm not sure why we weren't skipping those tests like on qa.d.o, but that is for another day.
And the second issue is most likely due to a PHP minor version difference
qa.d.o PHP 5.5.27
dci web-5.5 PHP 5.5.23
Comment #4
mile23runningOnTestbot()is a method defined within the simpletest example: http://cgit.drupalcode.org/examples/tree/simpletest_example/src/Tests/Si...So what's needed is a way to implement that method.
Is there a known environmental variable that can be checked?
The reason we're checking is so that we can show a failing test to the user.
Comment #5
isntall commentedWe can modify the check to something like this
return (file_exists("../checkout") || file_exists("../site_under_test") || file_exists("../html/checkout"));Though even with that check adjusted there are still failures.
Comment #6
mile23Right, it'd be great if there were a way to say
Is there an env variable that's always set under DrupalCI?
Comment #7
isntall commentedThis gets us into another conversation. Since devs can run DrupalCI from their local environment, should the test be skipped if they're using DrupalCI?
Comment #8
mile23Yes. :-)
The point is to show what a failed test looks like, but that's secondary to being able to use automated tests for the project.
Also, it's nice to demonstrate how to check for the testbot. Devs might set up special requirements for the testbot.
Comment #9
mile23Based on discussion with mixologic, using environmental variable.
Comment #11
mile23So what happened here is that simpletest_example was modified so it always returns TRUE for
runningOnTestbot().This will be changed back once the new testbot code makes it to production, where we can use the
DRUPALCIenvironmental variable to check whether we're running under the testbot.Comment #12
mile23This same issue is currently breaking the 7.x-1.x branch of Examples.
Comment #16
mile23New patch which uses the environmental variable.
Comment #18
mile23Derp.
:-)
OK, if this fails then we know the testbot code with the environmental variable still hasn't deployed.
Comment #22
vegantriathleteLet's see if the environment variable has been added, yet.
Comment #23
ultrabob commentedI'm going to update the docs to explain what is happening here, and how someone running through the tutorial can actually get the failures that the tutorial says they'll get. When this is fixed and backported, the tutorial should be updated as well.
Comment #24
mile23Follow-up in the testbot issue queue: #2860941: Expose an environmental variable so that SUT can change behavior
Comment #25
mile23Comment #26
mile23Really should be postponed on that issue.
Comment #27
jungleCan't find
SimpleTestExampleTestin the codebase of 4.0.x. Anddrupalci.ymlwas removed from the codebase.No activity for over 6 years. I am closing this. Please feel free to reopen if necessary.
Thanks!