mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-24 06:28:27 +01:00
Updated tests
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Speedtest Tracker
|
||||
|
||||
[](https://hub.docker.com/r/henrywhitaker3/speedtest-tracker) [](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) [](https://github.com/henrywhitaker3/Speedtest-Tracker/issues) [](https://github.com/henrywhitaker3/Speedtest-Tracker/commits)  [](https://github.com/henrywhitaker3/Speedtest-Tracker/blob/master/LICENSE)
|
||||
[](https://hub.docker.com/r/henrywhitaker3/speedtest-tracker) [](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) [](https://github.com/henrywhitaker3/Speedtest-Tracker/issues) [](https://github.com/henrywhitaker3/Speedtest-Tracker/commits)  [](https://github.com/henrywhitaker3/Speedtest-Tracker/blob/master/LICENSE)
|
||||
|
||||
This program runs a speedtest check every hour and graphs the results. The back-end is written in [Laravel](https://laravel.com/) and the front-end uses [React](https://reactjs.org/). It uses the [Ookla's speedtest cli](https://www.speedtest.net/apps/cli) package to get the data and uses [Chart.js](https://www.chartjs.org/) to plot the results.
|
||||
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
{
|
||||
"1.9.7": [
|
||||
{
|
||||
"description": "Added option to display minimum values on the top widgets.",
|
||||
"link": ""
|
||||
},
|
||||
{
|
||||
"description": "New general settings section.",
|
||||
"link": ""
|
||||
},
|
||||
{
|
||||
"description": "Updated dependencies.",
|
||||
"link": ""
|
||||
}
|
||||
],
|
||||
"1.9.6": [
|
||||
{
|
||||
"description": "Clear the cache on restore.",
|
||||
|
||||
@@ -7,7 +7,7 @@ return [
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'version' => '1.9.6',
|
||||
'version' => '1.9.7',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -27,13 +27,13 @@ class APISpeedtestTest extends TestCase
|
||||
$dl = [];
|
||||
$ul = [];
|
||||
|
||||
for($i = 0; $i < 3; $i++) {
|
||||
for ($i = 0; $i < 3; $i++) {
|
||||
$pingVal = $faker->randomFloat();
|
||||
array_push($ping,$pingVal);
|
||||
array_push($ping, $pingVal);
|
||||
$dlVal = $faker->randomFloat();
|
||||
array_push($dl,$dlVal);
|
||||
array_push($dl, $dlVal);
|
||||
$ulVal = $faker->randomFloat();
|
||||
array_push($ul,$ulVal);
|
||||
array_push($ul, $ulVal);
|
||||
|
||||
Speedtest::create([
|
||||
'ping' => $pingVal,
|
||||
@@ -70,7 +70,12 @@ class APISpeedtestTest extends TestCase
|
||||
'download',
|
||||
'upload',
|
||||
],
|
||||
'max' => [
|
||||
'maximum' => [
|
||||
'ping',
|
||||
'download',
|
||||
'upload',
|
||||
],
|
||||
'minimum' => [
|
||||
'ping',
|
||||
'download',
|
||||
'upload',
|
||||
|
||||
@@ -19,7 +19,7 @@ class LatestTest extends TestCase
|
||||
*/
|
||||
private $controller;
|
||||
|
||||
public function setUp() : void
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -53,6 +53,7 @@ class LatestTest extends TestCase
|
||||
|
||||
$this->assertArrayHasKey('data', $resp);
|
||||
$this->assertArrayHasKey('average', $resp);
|
||||
$this->assertArrayHasKey('max', $resp);
|
||||
$this->assertArrayHasKey('maximum', $resp);
|
||||
$this->assertArrayHasKey('minimum', $resp);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user