Skip to content

Commit

Permalink
added validation of shared folders functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
jedi4ever committed Mar 3, 2011
1 parent 789d0e0 commit f3bfa43
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ GEM
mario (0.0.6)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-ssh (2.1.0)
net-ssh (2.1.3)
open4 (1.0.1)
popen4 (0.1.2)
Platform (>= 0.4.0)
Expand Down
7 changes: 6 additions & 1 deletion lib/veewee/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,11 @@ def self.create_vm(boxname,force=false)

#Exec and system stop the execution here
Veewee::Shell.execute("#{command}")

#Set a shared folder for validation
command="#{@vboxcmd} sharedfolder add '#{boxname}' --name 'veewee-validation' --hostpath '#{File.expand_path(@veewee_dir)}/validation' --automount"

Veewee::Shell.execute("#{command}")

end

Expand Down Expand Up @@ -818,7 +823,7 @@ def self.transaction(boxname,step_name,checksums,&block)

#Need to look it up again because if it was an initial load
vm=VirtualBox::VM.find(boxname)
puts "Step [#{current_step_nr}] was succesfull - saving state"
puts "Step [#{current_step_nr}] was succesfully - saving state"
vm.save_state
sleep 2 #waiting for it to be ok
#puts "about to snapshot #{vm}"
Expand Down
6 changes: 3 additions & 3 deletions validation/vagrant.feature
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ Scenario: Checking puppet
And I run ". /etc/profile ; puppet --version 2> /dev/null 1>/dev/null; echo $?"
Then I should see "0" in the output

Scenario: Checking puppet
Scenario: Checking shared folders
When I ssh to "127.0.0.1" with the following credentials:
| username| password |keyfile | port |
| vagrant | vagrant | vagrant-private.key | 7222 |
And I run "whoami"
Then I should see "vagrant" in the output
And I run "mount|grep veewee-validation"
Then I should see "veewee-validation" in the output

0 comments on commit f3bfa43

Please sign in to comment.