Update development steps (#1623)

Ensure the development steps can be successfully executed with system
ruby on Fedora 36 to try and help new contributors have an easier
on-ramp.

Support running acceptance tests locally, though note that it may
require rvm if vagrant doesn't support the ruby version used by the
distro.
This commit is contained in:
Darragh Bailey
2022-10-01 15:53:00 +01:00
committed by GitHub
parent 54853d1d3d
commit 6d5ad2b87c
5 changed files with 25 additions and 12 deletions

View File

@@ -75,21 +75,19 @@ To work on the `vagrant-libvirt` plugin, clone this repository out, and use
```shell
git clone https://github.com/vagrant-libvirt/vagrant-libvirt.git
cd vagrant-libvirt
bundle config --local with development
bundle config --local path 'vendor/bundle'
bundle install
```
Once you have the dependencies, verify the unit tests pass with `rspec`:
```shell
export VAGRANT_HOME=$(mktemp -d)
bundle exec rspec --fail-fast --color --format documentation
```
If those pass, you're ready to start developing the plugin.
Setting `VAGRANT_HOME` is to avoid issues with conflicting with other
plugins/gems or data already present under `~/.vagrant.d`.
Additionally if you wish to test against a specific version of vagrant you
can control the version using the following before running the tests:
@@ -98,6 +96,13 @@ export VAGRANT_VERSION=v2.2.14
bundle update && bundle exec rspec --fail-fast --color --format documentation
```
To run the acceptance tests which involve bringing up VMs and exercising
various functionality aspects run the following (warning, may have issues if
distro ruby is newer than supported by vagrant):
```shell
bundle exec rspec --fail-fast --color --format documentation --tag acceptance
```
**Note** rvm is used by the maintainers to help provide an environment to test
against multiple ruby versions that align with the ones used by vagrant for
their embedded ruby depending on the release. You can see what version is used
@@ -132,7 +137,7 @@ end
Now you can use bundler to execute Vagrant:
```shell
$ bundle exec vagrant up --provider=libvirt
bundle exec vagrant up --provider=libvirt
```
**IMPORTANT NOTE:** bundle is crucial. You need to use bundled Vagrant.