setup seed data ¶
There are 2 process that can set up ‘seed’ data for testing and development.
There is a BaseSeeder - the ‘run’ method calls 2 methods: setup() and addShifts()
default ¶
The default seeder - DatabaseSeeder - inherits the setup() method which is
$this->call(ShiftIncentiveSeeder::class);
$this->call(PositionsTableSeeder::class);
$this->call(LocationsTableSeeder::class);
$this->call(CustomersTableSeeder::class);
// creates sample admin and sample vets, with employee records
$this->call(UsersTableSeeder::class);
// create separate manager accounts, for each site
$this->call(ManagerSeeder::class);
This block calls various seeders to set up common data - positions, customers, etc.
The run() method will then trigger a call to addShifts(), which, in the DatabaseSeeder class, will run the ShiftSeeder.
ShiftSeeder will create a handful of shifts - a few days in the past and a few days in the future, and is intended to be useful for basic development and any e2e testing.
PR/sandbox ¶
For PR environments, the build process will invoke
artisan db:seed --class=SandboxDatabaseSeeder
This is a slimmied down version of the earlier ‘sandbox’ seeder setup. It will drop/create the database, will restore the OAuth keys for QBO to avoid having to reconnect to QBO in most cases (but you reconnect by going to /sandboxsetup. It will run an artisan command for FullShiftSeeder. This class inherits from ShiftSeeder, but modifies the past/future date range to provide weeks of sample shifts for testing.
As of this writing, no shifts are assigned to any vets during this seed process.
sample users ¶
Previous sample users were carried over:
indie-manager@example.com multi-manager@example.com sample-admin@example.com sample-vet1@example.com sample-vet2@example.com sample-vet3@example.com
Additionally, manager-
- manager-perros@example.com
- manager-pom@example.com
- manager-bruisers@example.com
- manager-aardvark@example.com
- manager-rhinos@example.com
- manager-katze@example.com
- manager-whisker@example.com
- manager-snoop@example.com
Note: all passwords are pass1234