Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbreen28 committed May 15, 2024
1 parent 2b89d5a commit 80a4e21
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions spec/tasks/vagrant_spec.rb
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

0 comments on commit 80a4e21

Please sign in to comment.