Page MenuHomeDevCentral

No OneTemporary

diff --git a/ApiServersLogTest.php b/ApiServersLogTest.php
index 7a590b6..58b6f23 100644
--- a/ApiServersLogTest.php
+++ b/ApiServersLogTest.php
@@ -1,18 +1,18 @@
<?php
require_once 'traits/assertHttp.php';
-class ApiServersLogTest extends PHPUnit_Framework_TestCase {
+class ApiServersLogTest extends PHPUnit\Framework\TestCase {
use assertHttp;
public function testAlive () {
$url = 'https://api.nasqueron.org/servers-log/status';
$this->assertHttpResponseCode(200, $url);
$this->assertSame('ALIVE', file_get_contents($url));
}
public function testPutEntryPointWithGetRequestReturns405 () {
$url = 'https://api.nasqueron.org/servers-log';
$this->assertHttpResponseCode(405, $url);
}
}
diff --git a/AuthGroveTest.php b/AuthGroveTest.php
index f4dcc09..35d0a7b 100644
--- a/AuthGroveTest.php
+++ b/AuthGroveTest.php
@@ -1,28 +1,28 @@
<?php
require_once 'traits/assertHttp.php';
-class AuthGroveTest extends PHPUnit_Framework_TestCase {
+class AuthGroveTest extends PHPUnit\Framework\TestCase {
use assertHttp;
public function testRedirections () {
$this->assertHttpResponseCode(301, 'http://login.nasqueron.org', 'Webserver should be configured to redirect http to https.');
$this->assertHttpResponseCode(302, 'https://login.nasqueron.org', '/ should redirect to login page');
$this->assertHttpResponseCode(404, 'https://login.nasqueron.org/notexisting', 'A 404 code were expected for a not existing page.');
}
public function testSSL () {
$this->assertHttpResponseCode(200, 'https://login.nasqueron.org/auth/login', "Auth Grove HTTPS login page isn't reachable.");
}
public function testAlive () {
$url = 'https://login.nasqueron.org/status';
$this->assertHttpResponseCode(200, $url);
$this->assertSame('ALIVE', file_get_contents($url));
}
public function testHomepage () {
$content = file_get_contents('https://login.nasqueron.org');
$this->assertContains('https://login.nasqueron.org/auth/', $content);
}
}
diff --git a/DevCentralDockerTest.php b/DevCentralDockerTest.php
index d5214e7..083d1e4 100644
--- a/DevCentralDockerTest.php
+++ b/DevCentralDockerTest.php
@@ -1,42 +1,42 @@
<?php
require_once 'utils/DockerContainer.php';
-class DevCentralDockerTest extends PHPUnit_Framework_TestCase {
+class DevCentralDockerTest extends PHPUnit\Framework\TestCase {
private $container;
const DOCKER_CONTAINER = 'devcentral';
protected function setUp () {
if (!getenv('DOCKER_ACCESS')) {
$this->markTestSkipped("No access to Docker engine.");
}
$this->container = new DockerContainer(getenv('DOCKER_HOST'), self::DOCKER_CONTAINER);
}
public function testInitialized () {
$file = $this->container->exec("ls /opt/phabricator/.initialized");
$this->assertSame(
"/opt/phabricator/.initialized", $file,
".initialized file is missing: that could mean the whole /usr/local/bin/setup-phabricator didn't run."
);
}
public function testProcesses () {
$processes = $this->container->exec("ps auxw");
$expectedProcesses = [
'nginx: master process',
'nginx: worker process',
'php-fpm: master process',
'PhabricatorTaskmasterDaemon',
'PhabricatorBot',
];
foreach ($expectedProcesses as $expectedProcess) {
$this->assertContains($expectedProcess, $processes, "The process $expectedProcess isn't currently launched.");
}
}
}
diff --git a/DevCentralTest.php b/DevCentralTest.php
index 6f2dab8..2d5152b 100644
--- a/DevCentralTest.php
+++ b/DevCentralTest.php
@@ -1,20 +1,20 @@
<?php
require_once 'traits/assertHttp.php';
-class DevCentralTest extends PHPUnit_Framework_TestCase {
+class DevCentralTest extends PHPUnit\Framework\TestCase {
use assertHttp;
public function testWebsiteIsUp () {
$this->assertHttpResponseCode(200, 'https://devcentral.nasqueron.org', "DevCentral HTTPS issue.");
$this->assertHttpResponseCode(500, 'https://phabricator-files-for-devcentral-nasqueron.spacetechnology.net', "DevCentral alternative domain should return a 500 error code for homepage. Check phabricator.base-uri isn't empty.");
}
public function testNginxRedirectsHttpToHttps () {
$this->assertHttpResponseCode(301, 'http://devcentral.nasqueron.org', 'Nginx should redirect http to https with a 301 code.');
}
public function testAphlictIsUp () {
$this->assertHttpResponseCode(405, 'http://dwellers.nasqueron.org:22281/', 'Aphlict server seems down, does aphlict container is launched in Docker engine?');
}
}
diff --git a/EtherpadTest.php b/EtherpadTest.php
index 12f3bdd..ba6aaff 100644
--- a/EtherpadTest.php
+++ b/EtherpadTest.php
@@ -1,26 +1,26 @@
<?php
require_once 'traits/assertHttp.php';
-class EtherpadTest extends PHPUnit_Framework_TestCase {
+class EtherpadTest extends PHPUnit\Framework\TestCase {
use assertHttp;
public function testEtherpadIsLive () {
$this->assertHttpResponseCode(200, 'http://pad.nasqueron.org', 'Etherpad looks down.');
$this->assertHttpResponseCode(200, 'https://pad.nasqueron.org/', "Etherpad HTTPS issue.");
$this->assertHttpResponseCode(200, 'http://pad.wolfplex.be', "Etherpad doesn't reply to pad.wolfplex.be vhost.");
$this->assertHttpResponseCode(404, 'http://pad.nasqueron.org/notexisting', 'A 404 code were expected for a not existing Etherpad page.');
$this->assertHttpResponseCode(200, 'http://pad.nasqueron.org/metrics', "ep_ether-o-meter plugin doesn't seem installed.");
}
public function testWolfplexApiWorks () {
//Reported by philectro - 09:42 < philectro> hey tous les pad ont disparu :o
$url = "http://www.wolfplex.be/pad/";
$this->assertHttpResponseCode(200, $url);
$stringOnlyAvailableWhenApiWorks = '<li><a href="/pad/';
$currentContent = file_get_contents($url);
$this->assertContains($stringOnlyAvailableWhenApiWorks, $currentContent, "On Ysul, /home/wolfplex.org/logs/api.log could help. But more probably, you reinstalled the Etherpad container without restoring the API key. Move the former APIKEY.txt file to /opt/etherpad-lite or, if lost, update Wolfplex API credentials with the new API key.");
}
}
diff --git a/NotificationsTest.php b/NotificationsTest.php
index db92297..c9b3640 100644
--- a/NotificationsTest.php
+++ b/NotificationsTest.php
@@ -1,45 +1,45 @@
<?php
require_once 'traits/assertHttp.php';
-class NotificationsTest extends PHPUnit_Framework_TestCase {
+class NotificationsTest extends PHPUnit\Framework\TestCase {
use assertHttp;
///
/// Alive tests
///
public function testIsLive () {
$this->assertHttpResponseCode(200, 'http://notifications.nasqueron.org', 'Notifications center looks down.');
$this->assertHttpResponseCode(404, 'http://notifications.nasqueron.org/notexisting', 'A 404 code were expected for a not existing page.');
}
public function testSSL () {
$this->assertHttpResponseCode(200, 'https://notifications.nasqueron.org/', "Notifications center HTTPS issue.");
}
public function testAlive () {
$url = 'http://notifications.nasqueron.org/status';
$this->assertHttpResponseCode(200, $url);
$this->assertSame('ALIVE', file_get_contents($url));
}
///
/// Config tests
///
public function testGates () {
$this->assertHttpResponseCode(200, 'http://notifications.nasqueron.org/gate/GitHub', 'Gate missing: check GitHub is declared');
$this->assertHttpResponseCode(200, 'http://notifications.nasqueron.org/gate/Phabricator/Nasqueron', 'Gate missing: check DevCentral is declared in credentials.json');
}
public function testConfig () {
$url = 'https://notifications.nasqueron.org/config';
$this->assertHttpResponseCode(200, $url);
$this->assertJsonStringEqualsJsonFile(
__DIR__ . "/data/notifications.config.json",
file_get_contents($url),
"The Notifications Center configuration doesn't match the expected configuration harcoded in this repository."
);
}
}
diff --git a/TommyTest.php b/TommyTest.php
index 433703d..df69b13 100644
--- a/TommyTest.php
+++ b/TommyTest.php
@@ -1,27 +1,27 @@
<?php
require_once 'traits/assertHttp.php';
-class TommyTest extends PHPUnit_Framework_TestCase {
+class TommyTest extends PHPUnit\Framework\TestCase {
use assertHttp;
public function testIsLive () {
$this->assertHttpResponseCode(200, 'http://builds.nasqueron.org', 'Tommy looks down.');
$this->assertHttpResponseCode(404, 'http://builds.nasqueron.org/notexisting', 'A 404 code were expected for a not existing page.');
}
public function testSSL () {
$this->assertHttpResponseCode(200, 'https://builds.nasqueron.org/', "Tommy HTTPS issue.");
}
public function testAlive () {
$url = 'https://builds.nasqueron.org/status';
$this->assertHttpResponseCode(200, $url);
$this->assertSame('ALIVE', file_get_contents($url));
}
public function testDashboard () {
$content = file_get_contents('https://builds.nasqueron.org');
$this->assertContains('ci.nasqueron.org/job/', $content);
}
}
diff --git a/YsulApacheTest.php b/YsulApacheTest.php
index 38a5ddd..bceeb8f 100644
--- a/YsulApacheTest.php
+++ b/YsulApacheTest.php
@@ -1,57 +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 {
+class YsulApacheTest extends PHPUnit\Framework\TestCase {
use assertHttp;
/**
* Apache server hostname to test
*/
const SERVER = 'ysul.nasqueron.org';
/**
* Apache port
*/
const PORT = 3200;
/**
* @var string
*/
protected $url;
public function setUp () {
$this->url = "http://" . self::SERVER . ":" . self::PORT . "/";
}
public function testApacheIsLive () {
$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.
$url = $this->url . "~qa/test.cgi";
$this->assertHttpResponseCode(200, $url, "SuEXEC isn't installed or not configured to allow public_html CGI scripts.");
$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

Mime Type
text/x-diff
Expires
Tue, Jul 29, 13:57 (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2849351
Default Alt Text
(10 KB)

Event Timeline