minor on tests
This commit is contained in:
parent
c376556a9b
commit
8bba954930
3 changed files with 17 additions and 13 deletions
|
@ -4,7 +4,7 @@ rm -fr node_modules
|
|||
yarn
|
||||
yarn build
|
||||
yarn pack
|
||||
# yarn publish
|
||||
yarn publish
|
||||
gpg --pinentry-mode loopback --passphrase `pass underscore/pgp` --detach-sign --local-user 5DAC477D5441B7A15ACBF680BBEB4DD39AC6CCA9 gancio-$RELEASE.tgz
|
||||
cp gancio-$RELEASE.tgz releases/
|
||||
mv gancio-$RELEASE.tgz releases/latest.tgz
|
||||
|
@ -12,4 +12,4 @@ cp gancio-$RELEASE.tgz.sig releases/
|
|||
mv gancio-$RELEASE.tgz.sig releases/latest.tgz.sig
|
||||
yarn doc
|
||||
rsync -a docs/_site/ --chown=www-data:www-data cisti.web:/var/www/gancio/
|
||||
cd docs
|
||||
cd docs
|
|
@ -29,7 +29,6 @@ const models = {
|
|||
const db = {
|
||||
sequelize: null,
|
||||
loadModels () {
|
||||
|
||||
for (const modelName in models) {
|
||||
const m = models[modelName](db.sequelize, Sequelize.DataTypes)
|
||||
DB[modelName] = m
|
||||
|
|
|
@ -21,16 +21,21 @@ beforeAll(async () => {
|
|||
default:
|
||||
process.env.config_path = path.resolve(__dirname, './seeds/config.sqlite.json')
|
||||
}
|
||||
app = await require('../server/routes.js').main()
|
||||
const { sequelize } = require('../server/api/models/index')
|
||||
await sequelize.query('DELETE FROM settings')
|
||||
await sequelize.query('DELETE FROM events')
|
||||
await sequelize.query('DELETE FROM users')
|
||||
await sequelize.query('DELETE FROM ap_users')
|
||||
await sequelize.query('DELETE FROM tags')
|
||||
await sequelize.query('DELETE FROM places')
|
||||
await sequelize.query('DELETE FROM collections')
|
||||
await sequelize.query('DELETE FROM filters')
|
||||
try {
|
||||
app = await require('../server/routes.js').main()
|
||||
const { sequelize } = require('../server/api/models/index')
|
||||
await sequelize.query('DELETE FROM settings')
|
||||
await sequelize.query('DELETE FROM events')
|
||||
await sequelize.query('DELETE FROM user_followers')
|
||||
await sequelize.query('DELETE FROM users')
|
||||
await sequelize.query('DELETE FROM ap_users')
|
||||
await sequelize.query('DELETE FROM tags')
|
||||
await sequelize.query('DELETE FROM places')
|
||||
await sequelize.query('DELETE FROM filters')
|
||||
await sequelize.query('DELETE FROM collections')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
|
|
Loading…
Reference in a new issue