Commit Graph

14 Commits

Author SHA1 Message Date
Darragh Bailey
6bbde74be0 Ensure acceptance tests are executed (#1680)
Ensure the acceptance tests are actually executed and resolve any issues
that have crept in since they were not running as expected.

Call the ResolveDiskSettings on reload to ensure that the start domain
action will have all of the necessary configuration for any additional
storage disks added.

Tidy up create domain output when disks are attached.

Fixes: #1678
2022-11-23 17:33:10 +00:00
Darragh Bailey
dee41760cf Roll forward to ruby 3.1 and remove patches (#1660)
Use ruby 3.1 vagrant main and latest release, dropping the current
patching as these should now work with more recent rubies.

Retain the current ruby-libvirt patch.
2022-11-04 13:51:53 +00:00
Darragh Bailey
585cf6dd67 Remove calls to set-output as now deprecated (#1657) 2022-11-03 19:30:57 +01:00
Darragh Bailey
6d5ad2b87c 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.
2022-10-01 15:53:00 +01:00
dependabot[bot]
6775bf81b6 Bump actions/cache from 2 to 3 (#1595) 2022-09-12 14:15:41 +00:00
dependabot[bot]
f46cd70144 Bump actions/checkout from 2 to 3 (#1589) 2022-09-08 18:41:24 +00:00
Darragh Bailey
602b4e9ad8 Replace remaining stray references with main (#1582)
Ensure default branch has been fully updated everywhere to main, which
should fix the running of the unit and integration tests on the main
branch.
2022-09-07 10:50:28 +00:00
Darragh Bailey
41bd20269e Migrate acceptance tests to rspec (#1513)
Move existing tests executed with the help of bats to use rspec directly
combined with tags to filter them out from being executed by default.

This allows for more complex assertions as well as easier debug as the
code supports use of setting 'VAGRANT_SPEC_SKIP_CLEANUP' to prevent the
tests from removing the temporary directory created for home and work
directories.

Extend a number of classes from vagrant-spec to override default
behaviour to allow passing of additional environment variables for
packaging tests, as well as supporting the skip cleanup. Given the use
of after to perform the cleanup, need to vendor the vagrant-spec
acceptance context in order to modify it easily.
2022-06-13 23:43:06 +01:00
Darragh Bailey
31cc8aa91e Add basic vagrant package integration test (#1302)
Simple integration test for vagrant package to ensure the execution
completes successfully to allow for some refactoring to be performed.

Ensure libguestfs-tools installed to provide virt-sysprep for tests and
update docs to reflect.
2021-06-01 17:45:02 +01:00
Darragh Bailey
dbbfad2503 Generate test matrix dynamically from bats (#1303)
Extract the tests to be run and generate the matrix dynamically to avoid
needing to update the list within the workflow for each test added.
2021-06-01 17:21:15 +01:00
Darragh Bailey
9d70d261b4 Corrections to two test testing tool (#1276)
Ensure the two disk test tool is used to ensure any tweaks to the format
made to the script are exercised.
2021-05-14 19:11:33 +01:00
Darragh Bailey
4edb9a6831 Ensure git describe works during tests (#1280)
Resolve the error `fatal: No names found, cannot describe anything`
response coming out of calling git-describe due to fetch depth of 1.
2021-05-14 17:22:51 +00:00
Richard Turc
225237b125 Allow to use many disks in vagrant box for libvirt provider
Adds support for a new multi disk box format and handling to upload the
multiple disks to the storage pool.

New format is:
{
  'disks': [
    {
      'name': 'disk1.img',
      'virtual_size': 10,
      'format': 'qcow2'
    },
    {
      'name': 'disk2.img',
      'virtual_size': 15,
      'format': 'qcow2'
    },
    {
      'name': 'disk3.img',
    }
  ],
  'provider': 'libvirt',
  'format': 'qcow2'
}

It is expected to remove format from being set at the top level when
using the new format, with the assuming that qcow2 should be the default
format, and other formats should be permitted to be specified as needed.

Includes tests for handling the box images and creation of domain
volumes. Additionally includes an integration test to ensure a box with
2 disks will work as expected.

Partially fixes: #602
2021-05-08 17:04:10 +01:00
Michael Ablassmeier
97ea81d2be Use Github actions for integration tests against Vagrant-libvirt (#1091)
Allows to spin up vagrant boxes via vagrant-libvirt in CI replacing the 
need for vagrant-libvirt-qa to be executed separately before/after 
releases.

* Adds a github integration tests workflow
* Installs the needed toolset in separate groups for easier tracking
* Add Vagrantfile definitions for the first simple test cases in tests/ 
  using tinycore linux, using the installed master version these boxes 
  are spun up and destroyed via a test matrix.

Should help reduce effort for new maintainers to help with #1069
2021-03-21 12:06:52 +00:00