Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3913379
D162.id389.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D162.id389.diff
View Options
diff --git a/tests/prod-environment-behaves-correctly/NotificationsTest.php b/tests/prod-environment-behaves-correctly/NotificationsTest.php
new file mode 100644
--- /dev/null
+++ b/tests/prod-environment-behaves-correctly/NotificationsTest.php
@@ -0,0 +1,27 @@
+<?php
+
+require_once 'traits/assertHttp.php';
+
+class NotificationsTest extends PHPUnit_Framework_TestCase {
+ use assertHttp;
+
+ 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));
+ }
+
+ 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');
+ }
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 09:44 (21 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2307736
Default Alt Text
D162.id389.diff (1 KB)
Attached To
Mode
D162: Environment tests for notifications.nasqueron.org
Attached
Detach File
Event Timeline
Log In to Comment