"checkout" has always been a bit ambiguous. And it conflicts with most e-commerce systems. So can we just change the "checkout" directory to be named "site_under_test"?

Comments

rfay’s picture

Status: Active » Needs review
StatusFileSize
new2.51 KB

Here's a first shot. Think I got everything.

rfay’s picture

Title: Change the "checkout" directory to "site_under_test" or something » Change the "checkout" directory to "site_under_test"
StatusFileSize
new5.34 KB

This one is tested and seems to work OK

rfay’s picture

Missed a few.

I think I'll leave the 'pifr_checkout' key in the $databases as is, and also the $this->checkout_directory

They make sense and don't cause a lot of trouble.

bfroehle’s picture

Please note that several modules, including simpletest_example, test to see if they are running on Drupal testbots by looking for the 'checkout' directory.

Since this rename will break their functionality, it'd be nice to include a more resilient way to test for it...

rfay’s picture

Thanks for pointing out about simpletest_example. That's a huge hack I did a long time ago.

Do you have a suggestion how we can do it? I think that's a great thing to add to this. Something like setting a variable that says "Simpletest is testing us"?

bfroehle’s picture

Sadly I have no idea how it should be done.

rfay’s picture

Status: Needs review » Needs work

Doesn't apply any more.

Hoping I'll have the guts to do this sometime, even though it breaks a lot of existing docs.

bfroehle’s picture

I'd suggest that any change here comes after the introduction of a corresponding DrupalWebTestCase method to determine if the test is running on qa.drupal.org -- for the reasons above that we sometimes need to alter test cases for specific testing environments.

rfay’s picture

I like that. What would the appropriate strategy be, considering that DrupalWebTestCase is a core Drupal idea? Should we provide a function or something and do an if (function_exists(running_on_test_bot) && running_on_testbot()) ?

Edit... And since the actual functions available when running on the testbot are only Drupal's (plus any contrib) and not the PIFR functions or anything, this becomes harder. I think we'd have to rely on some marker (like the checkout directory currently). If (file_exists('/var/cache/iamatestbot')) ???

bfroehle’s picture

Without worrying about implementation details, what would the end-user API be?

if ($this->testingEnvironment() == "qa.drupal.org") {
  // ...
}