Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
updated to make test run again with rake 0.9
  • Loading branch information
jedi4ever committed Oct 6, 2011
1 parent d4a2b6b commit f73b086
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 29 deletions.
6 changes: 4 additions & 2 deletions Rakefile
Expand Up @@ -20,6 +20,7 @@ desc 'Tests requiring an real box'
Rake::TestTask.new do |t|
t.name="realtest"
t.libs << "test"
t.libs << "."
t.pattern = 'test/**/*_realtest.rb'
end

Expand All @@ -32,8 +33,9 @@ task :iso, [:box_name] do |t,args|
#end
Dir.glob("templates/*").each do |name|
definition_name=File.basename(name)
definition=Veewee::Environment.new(:cwd => ".",:definition_dir => "templates",:definition_path => "templates").get_definition(definition_name)
next if definition.iso_src.nil? || definition.iso_src==""
puts name
definition=Veewee::Environment.new(:cwd => ".",:definition_dir => "templates").definitions[definition_name]
next if definition.nil? || definition.iso_src.nil? || definition.iso_src==""
begin
url=definition.iso_src
found=false
Expand Down
46 changes: 23 additions & 23 deletions templates/gentoo-latest-i386-experimental/definition.rb
Expand Up @@ -3,27 +3,27 @@
:disk_size => '10140', :disk_format => 'VDI',:hostiocache => 'off',
:os_type_id => 'Gentoo',
:iso_file => "install-x86-minimal-20110726.iso",
:iso_src => "http://ftp.halifax.rwth-aachen.de/gentoo/releases/x86/autobuilds/20110726/install-x86-minimal-20110726.iso"
:iso_src => "http://ftp.halifax.rwth-aachen.de/gentoo/releases/x86/autobuilds/20110726/install-x86-minimal-20110726.iso",
:iso_md5 => "29fc74988e7f86417395e376afc1af47",
:iso_download_timeout => "1000",
:boot_wait => "120",:boot_cmd_sequence => [
'net-setup eth0<Enter>',
'<Wait><Enter>',
'2<Enter>',
'1<Enter>',
'<Wait><Wait>ifconfig -a <Enter>',
#'sleep 5 ;curl http://%IP%:%PORT%/stages.sh -o stages.sh &&',
#'bash stages.sh &<Enter>',
'passwd<Enter><Wait><Wait>',
'vagrant<Enter><Wait>',
'vagrant<Enter><Wait>',
'/etc/init.d/sshd start<Enter>'
],
:kickstart_port => "7122", :kickstart_timeout => "10000",:kickstart_file => "",
:ssh_login_timeout => "10000",:ssh_user => "root", :ssh_password => "vagrant",:ssh_key => "",
:ssh_host_port => "7222", :ssh_guest_port => "22",
:sudo_cmd => "cat '%f'|su -",
:shutdown_cmd => "shutdown -p now",
:postinstall_files => [ "postinstall.sh"],:postinstall_timeout => "10000"
}
)
:iso_download_timeout => "1000",
:boot_wait => "120",:boot_cmd_sequence => [
'net-setup eth0<Enter>',
'<Wait><Enter>',
'2<Enter>',
'1<Enter>',
'<Wait><Wait>ifconfig -a <Enter>',
#'sleep 5 ;curl http://%IP%:%PORT%/stages.sh -o stages.sh &&',
#'bash stages.sh &<Enter>',
'passwd<Enter><Wait><Wait>',
'vagrant<Enter><Wait>',
'vagrant<Enter><Wait>',
'/etc/init.d/sshd start<Enter>'
],
:kickstart_port => "7122", :kickstart_timeout => "10000",:kickstart_file => "",
:ssh_login_timeout => "10000",:ssh_user => "root", :ssh_password => "vagrant",:ssh_key => "",
:ssh_host_port => "7222", :ssh_guest_port => "22",
:sudo_cmd => "cat '%f'|su -",
:shutdown_cmd => "shutdown -p now",
:postinstall_files => [ "postinstall.sh"],:postinstall_timeout => "10000"
}
)
4 changes: 2 additions & 2 deletions test/build_test.rb → test/build_realtest.rb
@@ -1,5 +1,5 @@
require 'test/unit'
require 'lib/veewee'
require 'veewee'

class TestVeeweeBuild < Test::Unit::TestCase
def setup
Expand Down Expand Up @@ -35,7 +35,7 @@ def test_box_2_ssh
# Type on console
def test_box_3_console_type
assert_nothing_raised {
@box.console_type('echo "bla" > console.txt<Enter>')
@box.console_type(['echo "bla" > console.txt<Enter>'])
result=@box.ssh("cat console.txt")
assert_match(/bla/,result.stdout)
}
Expand Down
2 changes: 1 addition & 1 deletion test/definition_test.rb
@@ -1,5 +1,5 @@
require 'test/unit'
require 'lib/veewee'
require 'veewee'

class TestVeeweeDefinition < Test::Unit::TestCase
def test_environment_load_definition
Expand Down
2 changes: 1 addition & 1 deletion test/environment_test.rb
@@ -1,5 +1,5 @@
require 'test/unit'
require 'lib/veewee'
require 'veewee'
require 'tempfile'

class TestVeeweeEnvironment < Test::Unit::TestCase
Expand Down

0 comments on commit f73b086

Please sign in to comment.