mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@@ -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',
|
||||
];
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user