The switch to compare-xml exhibits non intuitive behaviour in that
comparing without use of verbose mode does not detect documents that are
identical. The if statement allowed the tests to pass but reads that if
the documents compare as true then emit an error message and raise an
exception. However this is because it returns false even with the docs
are the same content. Unfortunately there was no pre-existing test
case added when
Since there were concerns about equivalent-xml not being active upstream
raised by a distribution maintainer, switching back should be avoided.
Attempted use of nokogiri-diff indicated that whitespace changes would
be treated as differences with it being unclear how to easily exclude.
Moving to xml-simple, which although will treat whitespace as
significant and even with NormaliseSpace set to disregard any whitespace
around content elements, it requires walking the returned structure to
remove the empty content attribute that is left behind to allow a direct
comparison between the data structures.
To ensure the XML comparison is validated add a test where libvirt
returns XML that is different to what was requested, and assert that
the expected error is raised, an error message emitted and that the
domain define would be reverted to the previous state if possible.
Relates-To: #1565Fixes: #1556
Using diffy alone is insufficient to spot when the XML returned by
libvirt for the changes applied is equivalent but formatted differently.
When libvirt returns slightly differently formatted XML corresponding to
what changes were actually applied, it can result in an error being
assumed to have happened when the update actually worked as expected.
Equivalent-xml handles detecting XML documents as being identical,
therefore switching to using it instead of diffy should produce more
reliable results, while retaining diffy for better formatted diffs
should an issue occur is useful.
Fixes: #1556
Switch from having all documentation contained within the README to
publishing a jekyll static site of documentation under github pages.
This allows for configuration and installation guides to be handled
separately to make for the relevant pieces to be in smaller chunks and
therefore easier to follow for users. Additionally a table of contents
can now be included in a left navigation section that ensures it should
be possible to quickly jump from the start to any section and back
again.
Include support for publishing previews and releases under separate
directories to allow for them to exist at the same time as the other
latest version of the documents.
The navigation section also includes support for accessing any of the
other versions published so that it easier to see what configuration
options exist for a given release. These will be published automatically
when releases are added.
Calling undefine on a domain and recreating it can result in some edge
case errors where if the current capabilities of libvirt have been
reduced, it may not be possible to restore the old definition.
Instead switch to calling `domain_define` with the new definition and
check that the resulting libvirt domain definition has been updated in
the expected manner, otherwise report an error to the user.
Fixes: #949
Relates-to: #1329
Relates-to: #1027
Relates-to: #1371
Update the source code URI so that rubygems references the repository
that the code was moved to instead of from before when it was hosted
under the original author's personal org.
Vagrant recently bumped its minimum rspec version to 3.10. This commit
unrestricts the version so that the requirements from old and new vagrant
versions can be accommodated.
To ensure the tests can be run across multiple vagrant releases, must
allow newer rspec minor releases. As these are for development, it
should be alright to allow a wider range.
Move finalizing the id_ssh_key_file based on how other settings are
currently defined to a separate private function and extend the tests to
accept defining additional expects/allows within the table.
This should apply a consistent set of rules where if the user explicitly
supplies the key, it will attempt to resolve it based on the expected
ssh directory, and will always retain the explicit setting even if it
doesn't exist. Where connect_via_ssh is enabled, it will attempt to
detect if the default key exists, otherwise it will disable the setting.
If the user does not want automatic guesses, they can explicitly disable
by setting it to `nil`.
Fixes: #1228
Migrate to github actions as travis has switched to a process that will
require requesting minutes regularly for open source projects, and
current development is slow enough that this additional overhead is too
much.
Correct the generation of the line coverage following the example at
coverallsapp/github-action#29. Remove dependency on coveralls
gem as no longer needed if using the action.
Patch older versions of simplecov to contain a branch_coverage?
method to ensure working with simplecov-lcov.
Filter out spec helpers and test code from coverage reports.
This will prevent future changes reporting reduction in coverage
even when only adding additional tests.
Adds support for exposing the correct version via export-subst for
git-archive constructed tarballs to make it easier to consume directly
from source.
Will check in the following order of preference:
- version file
- format string containing "Tag:"
- clone remote to describe commit
Switch to looking up the version from a file with a fall back to get
it directly from git tags if the file isn't available.
The version file is automatically generated by a task of building of the
gem and included in the package release to prevent reading from git.
Should allow the release process to be automated from pushing of a git
tag.
In 5158b0e733, `git ls-files` was added to list the _files_ and _test_files_. This will never work for any process that uses a source tarball, like Debian packages and I think gems. Using `git ls-files` requires _git_ is installed on the build machine and requires that the _.git/_ dir is present in the source.
Example fixes:
* jfelchner/ruby-progressbar#54
* rubygems/rubygems#2064
* wpscanteam/CMSScanner#64
Add some basic spec tests for the WaitTillUp action class to lay some
foundations. Utilize vagrant-spec pinned to a known working commit for
tests to pass consistently until they provide releases.
Requires updating some of the rspec libraries and includes
sharedcontext.rb from the jantman/vagrant-r10k project on github.
As per #158, vagrant-libvirt depends on ruby-libvirt transitively
through fog. Since fog/fog#2706 was resolved, fog now requires
ruby-libvirt ~> 0.5.0, therefore vagrant-libvirt should allow both 0.4.x
and 0.5.x. Furthermore, according to semantic versioning, we currently
have no good reason to reject anything newer below 1.x. If such a
restriction is required in the future (e.g. < 0.7.0) then it is likely
that fog's .gemspec will take care of that on our behalf anyway.
Closes#158.