Skip to content
Browse files

updated to make test run again with rake 0.9

  • Loading branch information...
1 parent d4a2b6b commit f73b086c8e64b0c5db5a41b71d94522a266146e8 @jedi4ever committed
View
6 Rakefile
@@ -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
@@ -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
View
46 templates/gentoo-latest-i386-experimental/definition.rb
@@ -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"
+}
+ )
View
4 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
@@ -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)
}
View
2 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
View
2 test/environment_test.rb
@@ -1,5 +1,5 @@
require 'test/unit'
-require 'lib/veewee'
+require 'veewee'
require 'tempfile'
class TestVeeweeEnvironment < Test::Unit::TestCase

0 comments on commit f73b086

Please sign in to comment.
Something went wrong with that request. Please try again.