php artisan serve and dusk testing (#9422)

* php artisan serve and dusk testing

* Fix style

* move if into, in case we need to have different configs

* fix travis yml

* Add missing folders files

* Try to fixup Travis-ci

* revert variable, change check

* skip browser tests for phpunit runs
set up env correctly

* maybe bg is needed

* attempt to fix env

* install Chrome

* Update tests
fix migrations

* Move pylint to python2

* use testing .env

* Running chrome on port 9515 conflicts with the instance started by the tests.  It is probably not needed.

* suppress some artisan serve output

* remove the unused updater
This commit is contained in:
Tony Murray
2019-02-14 09:06:10 -06:00
committed by GitHub
parent 108348e93f
commit 63de34e295
19 changed files with 363 additions and 20 deletions

View File

@@ -16,14 +16,27 @@
use Carbon\Carbon;
use LibreNMS\Util\IPv4;
$factory->define(App\User::class, function (Faker\Generator $faker) {
$factory->define(App\Models\User::class, function (Faker\Generator $faker) {
static $password;
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'username' => $faker->unique()->userName,
'realname' => $faker->name,
'email' => $faker->safeEmail,
'password' => $password ?: $password = bcrypt('secret'),
'remember_token' => str_random(10),
'level' => 1,
];
});
$factory->state(App\Models\User::class, 'admin', function ($faker) {
return [
'level' => '10',
];
});
$factory->state(App\Models\User::class, 'read', function ($faker) {
return [
'level' => '5',
];
});