Page MenuHomeDevCentral

D791.diff
No OneTemporary

D791.diff

diff --git a/NotificationsTest.php b/NotificationsTest.php
--- a/NotificationsTest.php
+++ b/NotificationsTest.php
@@ -5,6 +5,10 @@
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.');
@@ -20,8 +24,22 @@
$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/data/notifications.config.json b/data/notifications.config.json
new file mode 100644
--- /dev/null
+++ b/data/notifications.config.json
@@ -0,0 +1,60 @@
+{
+ "gates": [
+ "DockerHub",
+ "GitHub",
+ "Jenkins",
+ "Phabricator"
+ ],
+ "features": [
+ {
+ "name": "Gate",
+ "enabled": true
+ },
+ {
+ "name": "GetConfig",
+ "enabled": true
+ },
+ {
+ "name": "ActionsReport",
+ "enabled": true
+ }
+ ],
+ "services": [
+ {
+ "gate": "GitHub",
+ "door": "Nasqueron",
+ "instance": "",
+ "status": ""
+ },
+ {
+ "gate": "GitHub",
+ "door": "Wolfplex",
+ "instance": "",
+ "status": ""
+ },
+ {
+ "gate": "GitHub",
+ "door": "Keruald",
+ "instance": "",
+ "status": ""
+ },
+ {
+ "gate": "GitHub",
+ "door": "TrustSpace",
+ "instance": "",
+ "status": ""
+ },
+ {
+ "gate": "GitHub",
+ "door": "Eglide",
+ "instance": "",
+ "status": ""
+ },
+ {
+ "gate": "Phabricator",
+ "door": "Nasqueron",
+ "instance": "https:\/\/devcentral.nasqueron.org",
+ "status": ""
+ }
+ ]
+}

File Metadata

Mime Type
text/plain
Expires
Mon, Oct 7, 17:59 (20 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2180838
Default Alt Text
D791.diff (2 KB)

Event Timeline