Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F4060817
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/YsulApacheTest.php b/YsulApacheTest.php
index 911160c..38a5ddd 100644
--- a/YsulApacheTest.php
+++ b/YsulApacheTest.php
@@ -1,41 +1,57 @@
<?php
require_once 'traits/assertHttp.php';
+/**
+ * These tests ensure Apache has been recompiled with
+ * the right options as long as SuEXEC is concerned.
+ */
class YsulApacheTest extends PHPUnit_Framework_TestCase {
use assertHttp;
/**
- * Apache server hostname to tet
+ * Apache server hostname to test
*/
const SERVER = 'ysul.nasqueron.org';
/**
* Apache port
*/
const PORT = 3200;
- /**
- * Path to SuEXEC binary
- */
- const SUEXEC = '/usr/local/sbin/suexec';
+ /**
+ * @var string
+ */
+ protected $url;
+
+ public function setUp () {
+ $this->url = "http://" . self::SERVER . ":" . self::PORT . "/";
+ }
public function testApacheIsLive () {
- $url = "http://" . self::SERVER . ":" . self::PORT . "/";
- $this->assertHttpResponseCode(200, $url, "Apache looks down.");
+ $this->assertHttpResponseCode(200, $this->url, "Apache looks down.");
}
+ public function testUserDirectoryWorks () {
+ $url = $this->url . "~qa/status.html";
+ $this->assertHttpResponseCode(200, $url, "Apache doesn't serve user directories.");
+ }
+
+ public function testUserDirectoryChmod () {
+ $url = $this->url . "~qa/";
+ $this->assertHttpResponseCode(200, $url, "Apache doesn't autoindex user directories.");
+
+ $url = $this->url . "~qa/noautoindex/";
+ $this->assertHttpResponseCode(403, $url, "Apache should return a 403 for user directories chmoded 711.");
+ }
+
public function testSuEXECHasBeenInstalled () {
// Reported by amj on T823, see also T508 and T517.
- if (gethostname() !== self::SERVER) {
- $this->markTestSkipped(
- "This test can only run on " . self::SERVER
- );
- };
+ $url = $this->url . "~qa/test.cgi";
+ $this->assertHttpResponseCode(200, $url, "SuEXEC isn't installed or not configured to allow public_html CGI scripts.");
- $this->assertTrue(
- file_exists(self::SUEXEC)
- );
+ $url = $this->url . "~qa/test.php";
+ $this->assertHttpResponseCode(200, $url, "SuEXEC should be patched to invoke php interpreter when the extension is .php.");
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Jan 28, 08:01 (5 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2380151
Default Alt Text
(2 KB)
Attached To
Mode
rTESTSPRODENV Test suite for operations: prod-environment-behaves-correctly
Attached
Detach File
Event Timeline
Log In to Comment