-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2b89d5a
commit aa846db
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
require 'spec_helper' | ||
require_relative '../../tasks/vagrant' | ||
|
||
describe 'vagrant' do | ||
let(:platform) { 'generic/debian10' } | ||
let(:inventory_location) { './spec/fixtures/litmus_inventory.yaml' } | ||
let(:enable_synced_folder) { true } | ||
let(:provider) { 'virtualbox' } | ||
let(:cpus) { 2 } | ||
let(:memory) { 2048 } | ||
let(:hyperv_vswitch) { nil } | ||
let(:hyperv_smb_username) { nil } | ||
let(:hyperv_smb_password) { nil } | ||
let(:box_url) { nil } | ||
let(:password) { 'password' } | ||
let(:vars) { 'role: worker1' } | ||
|
||
describe 'provision::vagrant' do | ||
it 'provisions a new vagrant box' do | ||
result = provision(platform, inventory_location, enable_synced_folder, provider, cpus, memory, hyperv_vswitch, hyperv_smb_username, hyperv_smb_password, box_url, password, vars) | ||
expect(result[:status]).to eq('ok') | ||
expect(result[:node_name]).not_to be_nil | ||
expect(result[:node]['facts']['provisioner']).to eq('vagrant') | ||
expect(result[:node]['facts']['platform']).to eq(platform) | ||
# expect(result[:node]['vars']).to eq(JSON.parse(vars)) | ||
end | ||
end | ||
end | ||
Check failure on line 28 in spec/tasks/vagrant_spec.rb GitHub Actions / Spec / Spec tests (Puppet: ~> 7.24, Ruby Ver: 2.7)
|