Spec fixes (#1603)

- the sysprep.sh script was not executable (flagged by rpmlint)
- Need to explicitly `require 'tmpdir'` in `spec_helper.rb` on openSUSE
Tumbleweed,
  otherwise you get tons of failures like:
```
An error occurred while loading ./spec/unit/action/prepare_nfs_settings_spec.rb.
Failure/Error: temp_dir = Dir.mktmpdir("rspec-")

NoMethodError:
  undefined method `mktmpdir' for Dir:Class

    temp_dir = Dir.mktmpdir("rspec-")
                  ^^^^^^^^^
  Did you mean?  mkdir
# ./spec/spec_helper.rb:44:in `block in <top (required)>'
# ./spec/spec_helper.rb:41:in `<top (required)>'
# ./spec/unit/action/prepare_nfs_settings_spec.rb:3:in `require'
# ./spec/unit/action/prepare_nfs_settings_spec.rb:3:in `<top (required)>'
```
This commit is contained in:
Dan Čermák 2022-09-22 12:35:14 +02:00 committed by GitHub
parent 17876ee81c
commit 33f2a39b3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

View File

@ -39,6 +39,8 @@ rescue LoadError
end
RSpec.configure do |config|
require 'tmpdir'
# set VAGRANT_HOME before any thing that requires vagrant is loaded to prevent
# the global plugin manager from trying to use the default VAGRANT_HOME.
temp_dir = Dir.mktmpdir("rspec-")