mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
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.
This commit is contained in:
21
spec/support/acceptance/configuration.rb
Normal file
21
spec/support/acceptance/configuration.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'vagrant-spec/acceptance/configuration'
|
||||
|
||||
module VagrantPlugins
|
||||
module VagrantLibvirt
|
||||
module Spec
|
||||
module Acceptance
|
||||
class Configuration < Vagrant::Spec::Acceptance::Configuration
|
||||
attr_accessor :clean_on_fail
|
||||
|
||||
def initialize
|
||||
super
|
||||
|
||||
@clean_on_fail = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user