1
0
Fork 0
mirror of synced 2024-06-15 05:41:10 -04:00
dotbot/test
Anish Athalye 191559601a Fix linking when using both relink and relative
Prior to this patch, the following config led to incorrect behavior:

    - link:
        ~/.folder/file:
          path: file
          create: true
          relative: true
          relink: true

Prior to the change, running the config the first time would result in
expected behavior. However, running the config for the second time would
result in deletion and re-creation of the link (even when the link is
correct).

This patch improves the interaction of relink and relative, taking
relative paths into account when checking the validity of existing links
in the `_delete()` method.
2016-04-07 14:45:46 -04:00
..
tests Fix linking when using both relink and relative 2016-04-07 14:45:46 -04:00
.editorconfig Update editorconfig 2015-05-06 08:39:10 -04:00
.gitignore Add testing framework and tests 2015-05-05 20:11:46 -04:00
driver-lib.bash Add ability to test with specific Python versions 2015-10-22 22:08:35 -04:00
README.md Add ability to test with specific Python versions 2015-10-22 22:08:35 -04:00
test Add ability to test with specific Python versions 2015-10-22 22:08:35 -04:00
test-lib.bash Add Travis CI support 2016-01-16 17:34:52 +09:00
test_travis Travis: add guard to test_travis 2016-01-18 13:14:56 +09:00
Vagrantfile Switch to Debian for testing in Vagrant 2016-03-05 02:07:01 -05:00

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.

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.