From a6967892ea2b7112a3367514f88b5fc3a13c437a Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 30 Jul 2020 10:30:49 +1000 Subject: [PATCH] system health route --- app/Http/Controllers/PingController.php | 10 + composer.lock | 291 +++++++++++++----------- routes/api.php | 3 +- tests/Integration/SystemHealthTest.php | 38 ++++ 4 files changed, 203 insertions(+), 139 deletions(-) create mode 100644 tests/Integration/SystemHealthTest.php diff --git a/app/Http/Controllers/PingController.php b/app/Http/Controllers/PingController.php index a3db94d940d0..f32f9d697438 100644 --- a/app/Http/Controllers/PingController.php +++ b/app/Http/Controllers/PingController.php @@ -11,6 +11,8 @@ namespace App\Http\Controllers; +use App\Utils\Ninja; +use App\Utils\SystemHealth; use Illuminate\Http\Request; class PingController extends BaseController @@ -28,4 +30,12 @@ class PingController extends BaseController 'user_name' => auth()->user()->present()->name(), ], 200); } + + public function health() + { + if(Ninja::isNinja()) + return response()->json(['message' => 'Route not available', 'errors'=>[]], 403); + + return response()->json(SystemHealth::check(),200); + } } diff --git a/composer.lock b/composer.lock index d001e3a70818..ca74f4fa4299 100644 --- a/composer.lock +++ b/composer.lock @@ -107,16 +107,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.147.2", + "version": "3.147.8", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "c58688f53c730b74cec1b6cfee8d9ed5bb40d946" + "reference": "b121ee1d69d3a1200ebc22d937cd40043b96a940" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c58688f53c730b74cec1b6cfee8d9ed5bb40d946", - "reference": "c58688f53c730b74cec1b6cfee8d9ed5bb40d946", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/b121ee1d69d3a1200ebc22d937cd40043b96a940", + "reference": "b121ee1d69d3a1200ebc22d937cd40043b96a940", "shasum": "" }, "require": { @@ -188,7 +188,7 @@ "s3", "sdk" ], - "time": "2020-07-21T18:11:40+00:00" + "time": "2020-07-29T18:16:33+00:00" }, { "name": "checkout/checkout-sdk-php", @@ -1103,6 +1103,20 @@ "sqlserver", "sqlsrv" ], + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", + "type": "tidelift" + } + ], "time": "2020-04-20T17:19:26+00:00" }, { @@ -1671,16 +1685,16 @@ }, { "name": "google/apiclient", - "version": "v2.6.0", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/googleapis/google-api-php-client.git", - "reference": "326e37fde5145079b74f1ce7249d242739d53cbc" + "reference": "48ec94577b51bde415270116118b07a294e07c43" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/326e37fde5145079b74f1ce7249d242739d53cbc", - "reference": "326e37fde5145079b74f1ce7249d242739d53cbc", + "url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/48ec94577b51bde415270116118b07a294e07c43", + "reference": "48ec94577b51bde415270116118b07a294e07c43", "shasum": "" }, "require": { @@ -1695,6 +1709,7 @@ }, "require-dev": { "cache/filesystem-adapter": "^0.3.2", + "composer/composer": "^1.10", "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", "phpcompatibility/php-compatibility": "^9.2", "phpunit/phpunit": "^4.8.36|^5.0", @@ -1728,20 +1743,20 @@ "keywords": [ "google" ], - "time": "2020-07-10T17:05:22+00:00" + "time": "2020-07-23T21:37:43+00:00" }, { "name": "google/apiclient-services", - "version": "v0.139", + "version": "v0.141", "source": { "type": "git", "url": "https://github.com/googleapis/google-api-php-client-services.git", - "reference": "84e99f792cae7bd92b8b54c75b0ad3502d628db6" + "reference": "4ba7279b0a56366e4f19b9d1a1b5456f99353b6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/84e99f792cae7bd92b8b54c75b0ad3502d628db6", - "reference": "84e99f792cae7bd92b8b54c75b0ad3502d628db6", + "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/4ba7279b0a56366e4f19b9d1a1b5456f99353b6f", + "reference": "4ba7279b0a56366e4f19b9d1a1b5456f99353b6f", "shasum": "" }, "require": { @@ -1765,20 +1780,20 @@ "keywords": [ "google" ], - "time": "2020-06-08T00:24:31+00:00" + "time": "2020-07-27T00:25:27+00:00" }, { "name": "google/auth", - "version": "v1.10.0", + "version": "v1.11.1", "source": { "type": "git", "url": "https://github.com/googleapis/google-auth-library-php.git", - "reference": "077d6ae98d550161d3b2a0ba283bdce785c74d85" + "reference": "bb959e91bd8ffbd352ab76cbf11d656ce6435088" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/077d6ae98d550161d3b2a0ba283bdce785c74d85", - "reference": "077d6ae98d550161d3b2a0ba283bdce785c74d85", + "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/bb959e91bd8ffbd352ab76cbf11d656ce6435088", + "reference": "bb959e91bd8ffbd352ab76cbf11d656ce6435088", "shasum": "" }, "require": { @@ -1817,7 +1832,7 @@ "google", "oauth2" ], - "time": "2020-07-08T19:11:36+00:00" + "time": "2020-07-27T18:33:35+00:00" }, { "name": "guzzlehttp/guzzle", @@ -2449,16 +2464,16 @@ }, { "name": "laravel/framework", - "version": "v6.18.26", + "version": "v6.18.31", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "d11b6168c65251ffa81ae0dfaf017ad2f30013da" + "reference": "a731824421f9ebc586728ea9c7cff231a249aaa9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/d11b6168c65251ffa81ae0dfaf017ad2f30013da", - "reference": "d11b6168c65251ffa81ae0dfaf017ad2f30013da", + "url": "https://api.github.com/repos/laravel/framework/zipball/a731824421f9ebc586728ea9c7cff231a249aaa9", + "reference": "a731824421f9ebc586728ea9c7cff231a249aaa9", "shasum": "" }, "require": { @@ -2593,7 +2608,7 @@ "framework", "laravel" ], - "time": "2020-07-21T14:25:39+00:00" + "time": "2020-07-27T18:23:18+00:00" }, { "name": "laravel/slack-notification-channel", @@ -2877,16 +2892,16 @@ }, { "name": "league/flysystem", - "version": "1.0.69", + "version": "1.0.70", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "7106f78428a344bc4f643c233a94e48795f10967" + "reference": "585824702f534f8d3cf7fab7225e8466cc4b7493" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/7106f78428a344bc4f643c233a94e48795f10967", - "reference": "7106f78428a344bc4f643c233a94e48795f10967", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/585824702f534f8d3cf7fab7225e8466cc4b7493", + "reference": "585824702f534f8d3cf7fab7225e8466cc4b7493", "shasum": "" }, "require": { @@ -2897,7 +2912,7 @@ "league/flysystem-sftp": "<1.0.6" }, "require-dev": { - "phpspec/phpspec": "^3.4", + "phpspec/phpspec": "^3.4 || ^4.0 || ^5.0 || ^6.0", "phpunit/phpunit": "^5.7.26" }, "suggest": { @@ -2963,7 +2978,7 @@ "type": "other" } ], - "time": "2020-05-18T15:13:39+00:00" + "time": "2020-07-26T07:20:36+00:00" }, { "name": "league/flysystem-aws-s3-v3", @@ -3014,16 +3029,16 @@ }, { "name": "league/flysystem-cached-adapter", - "version": "1.0.9", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem-cached-adapter.git", - "reference": "08ef74e9be88100807a3b92cc9048a312bf01d6f" + "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/08ef74e9be88100807a3b92cc9048a312bf01d6f", - "reference": "08ef74e9be88100807a3b92cc9048a312bf01d6f", + "url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/d1925efb2207ac4be3ad0c40b8277175f99ffaff", + "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff", "shasum": "" }, "require": { @@ -3057,7 +3072,7 @@ } ], "description": "An adapter decorator to enable meta-data caching.", - "time": "2018-07-09T20:51:04+00:00" + "time": "2020-07-25T15:56:04+00:00" }, { "name": "league/fractal", @@ -3507,16 +3522,16 @@ }, { "name": "monolog/monolog", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1" + "reference": "f9eee5cec93dfb313a38b6b288741e84e53f02d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/38914429aac460e8e4616c8cb486ecb40ec90bb1", - "reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f9eee5cec93dfb313a38b6b288741e84e53f02d5", + "reference": "f9eee5cec93dfb313a38b6b288741e84e53f02d5", "shasum": "" }, "require": { @@ -3594,7 +3609,7 @@ "type": "tidelift" } ], - "time": "2020-05-22T08:12:19+00:00" + "time": "2020-07-23T08:41:23+00:00" }, { "name": "mtdowling/jmespath.php", @@ -3701,16 +3716,16 @@ }, { "name": "nesbot/carbon", - "version": "2.36.1", + "version": "2.37.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "ee7378a36cc62952100e718bcc58be4c7210e55f" + "reference": "1f61206de973d67f36ce50f041c792ddac663c3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/ee7378a36cc62952100e718bcc58be4c7210e55f", - "reference": "ee7378a36cc62952100e718bcc58be4c7210e55f", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/1f61206de973d67f36ce50f041c792ddac663c3e", + "reference": "1f61206de973d67f36ce50f041c792ddac663c3e", "shasum": "" }, "require": { @@ -3786,20 +3801,20 @@ "type": "tidelift" } ], - "time": "2020-07-04T12:29:56+00:00" + "time": "2020-07-28T06:04:54+00:00" }, { "name": "nikic/php-parser", - "version": "v4.6.0", + "version": "v4.7.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "c346bbfafe2ff60680258b631afb730d186ed864" + "reference": "21dce06dfbf0365c6a7cc8fdbdc995926c6a9300" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c346bbfafe2ff60680258b631afb730d186ed864", - "reference": "c346bbfafe2ff60680258b631afb730d186ed864", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/21dce06dfbf0365c6a7cc8fdbdc995926c6a9300", + "reference": "21dce06dfbf0365c6a7cc8fdbdc995926c6a9300", "shasum": "" }, "require": { @@ -3816,7 +3831,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "4.7-dev" } }, "autoload": { @@ -3838,7 +3853,7 @@ "parser", "php" ], - "time": "2020-07-02T17:12:47+00:00" + "time": "2020-07-25T13:18:53+00:00" }, { "name": "nwidart/laravel-modules", @@ -5665,16 +5680,16 @@ }, { "name": "sentry/sentry", - "version": "2.4.1", + "version": "2.4.2", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-php.git", - "reference": "407573e22e6cc46b72cff07c117eeb16bf3a17de" + "reference": "b3b4f4a08b184c3f22b208f357e8720ef42938b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/407573e22e6cc46b72cff07c117eeb16bf3a17de", - "reference": "407573e22e6cc46b72cff07c117eeb16bf3a17de", + "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/b3b4f4a08b184c3f22b208f357e8720ef42938b0", + "reference": "b3b4f4a08b184c3f22b208f357e8720ef42938b0", "shasum": "" }, "require": { @@ -5758,7 +5773,7 @@ "type": "custom" } ], - "time": "2020-07-03T09:58:40+00:00" + "time": "2020-07-24T07:02:19+00:00" }, { "name": "sentry/sentry-laravel", @@ -6096,16 +6111,16 @@ }, { "name": "stripe/stripe-php", - "version": "v7.44.0", + "version": "v7.45.0", "source": { "type": "git", "url": "https://github.com/stripe/stripe-php.git", - "reference": "b39ccc77358fbe0d462e6cc89ac01b7a0c896f35" + "reference": "21e5001f5e0d787e4755c8bfc00e578dce9ae058" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stripe/stripe-php/zipball/b39ccc77358fbe0d462e6cc89ac01b7a0c896f35", - "reference": "b39ccc77358fbe0d462e6cc89ac01b7a0c896f35", + "url": "https://api.github.com/repos/stripe/stripe-php/zipball/21e5001f5e0d787e4755c8bfc00e578dce9ae058", + "reference": "21e5001f5e0d787e4755c8bfc00e578dce9ae058", "shasum": "" }, "require": { @@ -6149,7 +6164,7 @@ "payment processing", "stripe" ], - "time": "2020-07-20T21:25:50+00:00" + "time": "2020-07-29T04:29:52+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -6215,16 +6230,16 @@ }, { "name": "symfony/console", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "326b064d804043005526f5a0494cfb49edb59bb0" + "reference": "55d07021da933dd0d633ffdab6f45d5b230c7e02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/326b064d804043005526f5a0494cfb49edb59bb0", - "reference": "326b064d804043005526f5a0494cfb49edb59bb0", + "url": "https://api.github.com/repos/symfony/console/zipball/55d07021da933dd0d633ffdab6f45d5b230c7e02", + "reference": "55d07021da933dd0d633ffdab6f45d5b230c7e02", "shasum": "" }, "require": { @@ -6302,11 +6317,11 @@ "type": "tidelift" } ], - "time": "2020-05-30T20:06:45+00:00" + "time": "2020-07-06T13:18:39+00:00" }, { "name": "symfony/css-selector", - "version": "v5.1.2", + "version": "v5.1.3", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -6373,16 +6388,16 @@ }, { "name": "symfony/debug", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "28f92d08bb6d1fddf8158e02c194ad43870007e6" + "reference": "47aa9064d75db36389692dd4d39895a0820f00f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/28f92d08bb6d1fddf8158e02c194ad43870007e6", - "reference": "28f92d08bb6d1fddf8158e02c194ad43870007e6", + "url": "https://api.github.com/repos/symfony/debug/zipball/47aa9064d75db36389692dd4d39895a0820f00f2", + "reference": "47aa9064d75db36389692dd4d39895a0820f00f2", "shasum": "" }, "require": { @@ -6440,7 +6455,7 @@ "type": "tidelift" } ], - "time": "2020-05-24T08:33:35+00:00" + "time": "2020-07-23T08:31:43+00:00" }, { "name": "symfony/deprecation-contracts", @@ -6508,16 +6523,16 @@ }, { "name": "symfony/error-handler", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "0df9a23c0f9eddbb6682479fee6fd58b88add75b" + "reference": "66f151360550ec2b3273b3746febb12e6ba0348b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/0df9a23c0f9eddbb6682479fee6fd58b88add75b", - "reference": "0df9a23c0f9eddbb6682479fee6fd58b88add75b", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/66f151360550ec2b3273b3746febb12e6ba0348b", + "reference": "66f151360550ec2b3273b3746febb12e6ba0348b", "shasum": "" }, "require": { @@ -6575,20 +6590,20 @@ "type": "tidelift" } ], - "time": "2020-05-28T10:39:14+00:00" + "time": "2020-07-23T08:35:20+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "a5370aaa7807c7a439b21386661ffccf3dff2866" + "reference": "6140fc7047dafc5abbe84ba16a34a86c0b0229b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a5370aaa7807c7a439b21386661ffccf3dff2866", - "reference": "a5370aaa7807c7a439b21386661ffccf3dff2866", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/6140fc7047dafc5abbe84ba16a34a86c0b0229b8", + "reference": "6140fc7047dafc5abbe84ba16a34a86c0b0229b8", "shasum": "" }, "require": { @@ -6659,7 +6674,7 @@ "type": "tidelift" } ], - "time": "2020-05-20T08:37:50+00:00" + "time": "2020-06-18T17:59:13+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -6739,7 +6754,7 @@ }, { "name": "symfony/filesystem", - "version": "v5.1.2", + "version": "v5.1.3", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -6803,20 +6818,20 @@ }, { "name": "symfony/finder", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "5729f943f9854c5781984ed4907bbb817735776b" + "reference": "2727aa35fddfada1dd37599948528e9b152eb742" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/5729f943f9854c5781984ed4907bbb817735776b", - "reference": "5729f943f9854c5781984ed4907bbb817735776b", + "url": "https://api.github.com/repos/symfony/finder/zipball/2727aa35fddfada1dd37599948528e9b152eb742", + "reference": "2727aa35fddfada1dd37599948528e9b152eb742", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.1.3" }, "type": "library", "extra": { @@ -6862,20 +6877,20 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:54:36+00:00" + "time": "2020-07-05T09:39:30+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "3adfbd7098c850b02d107330b7b9deacf2581578" + "reference": "3675676b6a47f3e71d3ab10bcf53fb9239eb77e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3adfbd7098c850b02d107330b7b9deacf2581578", - "reference": "3adfbd7098c850b02d107330b7b9deacf2581578", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3675676b6a47f3e71d3ab10bcf53fb9239eb77e6", + "reference": "3675676b6a47f3e71d3ab10bcf53fb9239eb77e6", "shasum": "" }, "require": { @@ -6931,20 +6946,20 @@ "type": "tidelift" } ], - "time": "2020-05-23T09:11:46+00:00" + "time": "2020-07-23T09:48:09+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "81d42148474e1852a333ed7a732f2a014af75430" + "reference": "a675d2bf04a9328f164910cae6e3918b295151f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/81d42148474e1852a333ed7a732f2a014af75430", - "reference": "81d42148474e1852a333ed7a732f2a014af75430", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/a675d2bf04a9328f164910cae6e3918b295151f3", + "reference": "a675d2bf04a9328f164910cae6e3918b295151f3", "shasum": "" }, "require": { @@ -7036,20 +7051,20 @@ "type": "tidelift" } ], - "time": "2020-06-12T11:15:37+00:00" + "time": "2020-07-24T04:10:09+00:00" }, { "name": "symfony/mime", - "version": "v5.1.2", + "version": "v5.1.3", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "c0c418f05e727606e85b482a8591519c4712cf45" + "reference": "149fb0ad35aae3c7637b496b38478797fa6a7ea6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/c0c418f05e727606e85b482a8591519c4712cf45", - "reference": "c0c418f05e727606e85b482a8591519c4712cf45", + "url": "https://api.github.com/repos/symfony/mime/zipball/149fb0ad35aae3c7637b496b38478797fa6a7ea6", + "reference": "149fb0ad35aae3c7637b496b38478797fa6a7ea6", "shasum": "" }, "require": { @@ -7113,20 +7128,20 @@ "type": "tidelift" } ], - "time": "2020-06-09T15:07:35+00:00" + "time": "2020-07-23T10:04:31+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.1.2", + "version": "v5.1.3", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "663f5dd5e14057d1954fe721f9709d35837f2447" + "reference": "9ff59517938f88d90b6e65311fef08faa640f681" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/663f5dd5e14057d1954fe721f9709d35837f2447", - "reference": "663f5dd5e14057d1954fe721f9709d35837f2447", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/9ff59517938f88d90b6e65311fef08faa640f681", + "reference": "9ff59517938f88d90b6e65311fef08faa640f681", "shasum": "" }, "require": { @@ -7183,7 +7198,7 @@ "type": "tidelift" } ], - "time": "2020-05-23T13:08:13+00:00" + "time": "2020-07-12T12:58:00+00:00" }, { "name": "symfony/polyfill-ctype", @@ -7966,20 +7981,20 @@ }, { "name": "symfony/process", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "c714958428a85c86ab97e3a0c96db4c4f381b7f5" + "reference": "65e70bab62f3da7089a8d4591fb23fbacacb3479" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/c714958428a85c86ab97e3a0c96db4c4f381b7f5", - "reference": "c714958428a85c86ab97e3a0c96db4c4f381b7f5", + "url": "https://api.github.com/repos/symfony/process/zipball/65e70bab62f3da7089a8d4591fb23fbacacb3479", + "reference": "65e70bab62f3da7089a8d4591fb23fbacacb3479", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.1.3" }, "type": "library", "extra": { @@ -8025,24 +8040,24 @@ "type": "tidelift" } ], - "time": "2020-05-30T20:06:45+00:00" + "time": "2020-07-23T08:31:43+00:00" }, { "name": "symfony/routing", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "0f557911dde75c2a9652b8097bd7c9f54507f646" + "reference": "e103381a4c2f0731c14589041852bf979e97c7af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/0f557911dde75c2a9652b8097bd7c9f54507f646", - "reference": "0f557911dde75c2a9652b8097bd7c9f54507f646", + "url": "https://api.github.com/repos/symfony/routing/zipball/e103381a4c2f0731c14589041852bf979e97c7af", + "reference": "e103381a4c2f0731c14589041852bf979e97c7af", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.1.3" }, "conflict": { "symfony/config": "<4.2", @@ -8115,7 +8130,7 @@ "type": "tidelift" } ], - "time": "2020-05-30T20:07:26+00:00" + "time": "2020-07-05T09:39:30+00:00" }, { "name": "symfony/service-contracts", @@ -8195,16 +8210,16 @@ }, { "name": "symfony/translation", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "79d3ef9096a6a6047dbc69218b68c7b7f63193af" + "reference": "a8ea9d97353294eb6783f2894ef8cee99a045822" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/79d3ef9096a6a6047dbc69218b68c7b7f63193af", - "reference": "79d3ef9096a6a6047dbc69218b68c7b7f63193af", + "url": "https://api.github.com/repos/symfony/translation/zipball/a8ea9d97353294eb6783f2894ef8cee99a045822", + "reference": "a8ea9d97353294eb6783f2894ef8cee99a045822", "shasum": "" }, "require": { @@ -8281,7 +8296,7 @@ "type": "tidelift" } ], - "time": "2020-05-30T20:06:45+00:00" + "time": "2020-07-23T08:31:43+00:00" }, { "name": "symfony/translation-contracts", @@ -8360,16 +8375,16 @@ }, { "name": "symfony/var-dumper", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "56b3aa5eab0ac6720dcd559fd1d590ce301594ac" + "reference": "2125805a1a4e57f2340bc566c3013ca94d2722dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/56b3aa5eab0ac6720dcd559fd1d590ce301594ac", - "reference": "56b3aa5eab0ac6720dcd559fd1d590ce301594ac", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/2125805a1a4e57f2340bc566c3013ca94d2722dc", + "reference": "2125805a1a4e57f2340bc566c3013ca94d2722dc", "shasum": "" }, "require": { @@ -8447,7 +8462,7 @@ "type": "tidelift" } ], - "time": "2020-05-30T20:06:45+00:00" + "time": "2020-06-24T13:34:53+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -10922,16 +10937,16 @@ }, { "name": "swagger-api/swagger-ui", - "version": "v3.30.1", + "version": "v3.30.2", "source": { "type": "git", "url": "https://github.com/swagger-api/swagger-ui.git", - "reference": "c654d08af86f1eb54b80f16d7ab0087170d56a67" + "reference": "d8521c1bc067cfa57108ecf8f1a513db039ff1da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swagger-api/swagger-ui/zipball/c654d08af86f1eb54b80f16d7ab0087170d56a67", - "reference": "c654d08af86f1eb54b80f16d7ab0087170d56a67", + "url": "https://api.github.com/repos/swagger-api/swagger-ui/zipball/d8521c1bc067cfa57108ecf8f1a513db039ff1da", + "reference": "d8521c1bc067cfa57108ecf8f1a513db039ff1da", "shasum": "" }, "type": "library", @@ -10975,11 +10990,11 @@ "swagger", "ui" ], - "time": "2020-07-21T19:36:10+00:00" + "time": "2020-07-22T20:37:48+00:00" }, { "name": "symfony/yaml", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", diff --git a/routes/api.php b/routes/api.php index 1db2f96a6b8d..2d05c759fe64 100644 --- a/routes/api.php +++ b/routes/api.php @@ -24,7 +24,8 @@ Route::group(['api_secret_check', 'email_db'], function () { Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'api/v1', 'as' => 'api.'], function () { Route::get('ping', 'PingController@index')->name('ping'); - + Route::get('health_check', 'PingController@health')->name('health_check'); + Route::resource('activities', 'ActivityController');// name = (clients. index / create / show / update / destroy / edit Route::resource('clients', 'ClientController');// name = (clients. index / create / show / update / destroy / edit diff --git a/tests/Integration/SystemHealthTest.php b/tests/Integration/SystemHealthTest.php new file mode 100644 index 000000000000..64b4e4822f10 --- /dev/null +++ b/tests/Integration/SystemHealthTest.php @@ -0,0 +1,38 @@ +makeTestData(); + } + + public function testSystemHealthRouteAvailable() + { + $response = $this->withHeaders([ + 'X-API-SECRET' => config('ninja.api_secret'), + 'X-API-TOKEN' => $this->token + ])->get('/api/v1/health_check'); + + + $response->assertStatus(200); + } + + +}