mirror of
1
0
Fork 0
dotbot/test
Anish Athalye 9ff1db1672 Change default Python version in tests to 3.6.4 2018-03-27 18:16:55 -04:00
..
tests Fix bug with shell defaults 2017-06-27 21:27:50 -07:00
.editorconfig Add tests for more Python versions 2017-03-06 15:20:27 -05:00
.gitignore Add testing framework and tests 2015-05-05 20:11:46 -04:00
README.md Add instructions for installing test env on macOS 2018-03-27 17:42:42 -04:00
Vagrantfile Update to Debian 9 (Stretch) for testing 2018-03-27 17:26:34 -04:00
driver-lib.bash Add ability to test with specific Python versions 2015-10-22 22:08:35 -04:00
test Change default Python version in tests to 3.6.4 2018-03-27 18:16:55 -04:00
test-lib.bash Add Travis CI support 2016-01-16 17:34:52 +09:00
test_travis Fix tests for Travis CI 2017-03-26 11:50:01 -04:00

README.md

Testing

Dotbot testing code uses Vagrant to run all tests inside a virtual machine to have tests be completely isolated from the host machine. The test driver relies on the Sahara plugin to snapshot and roll back virtual machine state. The tests are deterministic, and each test is run in a virtual machine with fresh state, ensuring that tests that modify system state are easily repeatable.

Installing the Test environnement

Debian-based distributions

  • Install the test requirements
sudo apt install vagrant virtualbox
  • Install the Sahara Vagrant plugin
vagrant plugin install sahara
  • Install Dotbot dependencies
git submodule update --init --recursive

macOS

vagrant plugin install sahara
  • Install Dotbot dependencies
git submodule update --init --recursive

Running the Tests

Before running the tests, the virtual machine must be running. It can be started by running vagrant up.

The test suite can be run by running ./test. Selected tests can be run by passing paths to the tests as arguments to ./test.

Tests can be run with a specific Python version by running ./test --version <version> - for example, ./test --version 3.4.3.

When finished with testing, it is good to shut down the virtual machine by running vagrant halt.