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
|
||||||
yarn build
|
yarn build
|
||||||
yarn pack
|
yarn pack
|
||||||
# yarn publish
|
yarn publish
|
||||||
gpg --pinentry-mode loopback --passphrase `pass underscore/pgp` --detach-sign --local-user 5DAC477D5441B7A15ACBF680BBEB4DD39AC6CCA9 gancio-$RELEASE.tgz
|
gpg --pinentry-mode loopback --passphrase `pass underscore/pgp` --detach-sign --local-user 5DAC477D5441B7A15ACBF680BBEB4DD39AC6CCA9 gancio-$RELEASE.tgz
|
||||||
cp gancio-$RELEASE.tgz releases/
|
cp gancio-$RELEASE.tgz releases/
|
||||||
mv gancio-$RELEASE.tgz releases/latest.tgz
|
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
|
mv gancio-$RELEASE.tgz.sig releases/latest.tgz.sig
|
||||||
yarn doc
|
yarn doc
|
||||||
rsync -a docs/_site/ --chown=www-data:www-data cisti.web:/var/www/gancio/
|
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 = {
|
const db = {
|
||||||
sequelize: null,
|
sequelize: null,
|
||||||
loadModels () {
|
loadModels () {
|
||||||
|
|
||||||
for (const modelName in models) {
|
for (const modelName in models) {
|
||||||
const m = models[modelName](db.sequelize, Sequelize.DataTypes)
|
const m = models[modelName](db.sequelize, Sequelize.DataTypes)
|
||||||
DB[modelName] = m
|
DB[modelName] = m
|
||||||
|
|
|
@ -21,16 +21,21 @@ beforeAll(async () => {
|
||||||
default:
|
default:
|
||||||
process.env.config_path = path.resolve(__dirname, './seeds/config.sqlite.json')
|
process.env.config_path = path.resolve(__dirname, './seeds/config.sqlite.json')
|
||||||
}
|
}
|
||||||
app = await require('../server/routes.js').main()
|
try {
|
||||||
const { sequelize } = require('../server/api/models/index')
|
app = await require('../server/routes.js').main()
|
||||||
await sequelize.query('DELETE FROM settings')
|
const { sequelize } = require('../server/api/models/index')
|
||||||
await sequelize.query('DELETE FROM events')
|
await sequelize.query('DELETE FROM settings')
|
||||||
await sequelize.query('DELETE FROM users')
|
await sequelize.query('DELETE FROM events')
|
||||||
await sequelize.query('DELETE FROM ap_users')
|
await sequelize.query('DELETE FROM user_followers')
|
||||||
await sequelize.query('DELETE FROM tags')
|
await sequelize.query('DELETE FROM users')
|
||||||
await sequelize.query('DELETE FROM places')
|
await sequelize.query('DELETE FROM ap_users')
|
||||||
await sequelize.query('DELETE FROM collections')
|
await sequelize.query('DELETE FROM tags')
|
||||||
await sequelize.query('DELETE FROM filters')
|
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 () => {
|
afterAll(async () => {
|
||||||
|
|
Loading…
Reference in a new issue