Last active
September 2, 2016 09:15
-
-
Save mhl/848f7980d256ca38ff603375be4f264e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This assumes that you have created a vagrant instance based on | |
# trusty with localhost:3000 from the host forwarded to localhost:3000 | |
# in the guest, and there is a popit instance running inside it that | |
# was created roughly with (after logging in with 'vagrant ssh'): | |
# sudo apt-get update | |
# sudo apt-get install git-core | |
# git clone https://github.com/ciudadanointeligente/write-it.git | |
# sudo apt-get install nodejs npm | |
# sudo ln -s /usr/bin/nodejs /usr/bin/node | |
# If necessary, apply this patch: | |
# https://gist.github.com/mhl/18c0acf121de4f2dcdeb7b715461febd | |
# Start the PopIt server in the vagrant box with: | |
# ./start_local_popit_api.bash | |
alias vagrant-ssh='ssh -oStrictHostKeyChecking=no -i "/home/mark/write-it/vagrant-local-popit/.vagrant/machines/default/virtualbox/private_key" -p 2222 vagrant@localhost' | |
for f in \ | |
default \ | |
persons_with_emails \ | |
persons_with_emails2 \ | |
other_people_with_popolo_emails \ | |
persons_with_null_values \ | |
person_with_preferred_email_and_contact_detail \ | |
persons_with_memberships \ | |
other_persons | |
do | |
rm -v nuntium/tests/fixtures/vcr_cassettes/*.yaml | |
vagrant-ssh "mongo test-popit-api-db --eval 'db.dropDatabase()'" | |
vagrant-ssh "cd write-it && popit-api-for-testing/node_modules/.bin/mongofixtures test-popit-api-db nuntium/tests/fixtures/$f.js" | |
./manage.py test nuntium contactos mailit | |
git add nuntium/tests/fixtures/vcr_cassettes/$f.yaml | |
done | |
git commit -m "Re-record the fixtures" | |
git checkout nuntium/tests/fixtures/vcr_cassettes/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment