Skip to content

Instantly share code, notes, and snippets.

@jonathancg90
Last active February 22, 2017 20:46
Show Gist options
  • Save jonathancg90/0477f86d2dde7b7fae0c66cee157afa8 to your computer and use it in GitHub Desktop.
Save jonathancg90/0477f86d2dde7b7fae0c66cee157afa8 to your computer and use it in GitHub Desktop.
Test Crehana
Secuencia de comandos para generar la BD
1) Eliminar la BD de test
dropdb test_gotham || true
2) Eliminar el backup generado anetriormente
rm backup.dump
3) Crear la BD de test
createdb test_gotham
4) Generar un nuevo backup de la BD master actual
pg_dump gotham -h localhost --no-owner -v -Fc > backup.dump
5) Restaurar el backup generado a la BD test recien creado
pg_restore -h localhost -p 5432 -d test_gotham -v -Fc backup.dump
6) Ejecutar test
python run_test.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment