mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
* mock-knex * test on the migrations run started. * test passing for run.up() * reorganize /tests/ to allow integration tests * e2e setup changes * e2e jest.config moved * e2e paths fixed, integration config * add nonadmin role and user seed+migration * auth/login w/ documentation (docs will be moved) * update user seed * add postgres10 to the ci? * argon2 saves the day * items tests passing with postgres10 support * removed comments * move generateHash out of directus_users Co-authored-by: Jay Cammarano <jaycammarano@gmail.com>
23 lines
620 B
JavaScript
23 lines
620 B
JavaScript
const generateHash = require('../utils/generateHash');
|
|
|
|
exports.seed = async function (knex) {
|
|
return await knex('directus_users').insert([
|
|
{
|
|
id: 'a8057636-9b70-4804-bfec-19c88d1a3273',
|
|
email: 'test@admin.com',
|
|
password: await generateHash.hash('TestAdminPassword'),
|
|
status: 'active',
|
|
role: '5b935e65-d3db-4457-96f1-597e2fcfc7f3',
|
|
token: 'AdminToken',
|
|
},
|
|
{
|
|
id: 'cb8cd13b-037f-40ca-862a-ea1e1f4bfca2',
|
|
email: 'test@user.com',
|
|
password: await generateHash.hash('TestUserPassword'),
|
|
status: 'active',
|
|
role: '214faee7-d6a6-4a4c-b1cd-f9e9bd0b6fb7',
|
|
token: 'UserToken',
|
|
},
|
|
]);
|
|
};
|