diff --git a/.idea/vagrant-openshift.iml b/.idea/vagrant-openshift.iml index 1c405ea6..4ea1fa7b 100644 --- a/.idea/vagrant-openshift.iml +++ b/.idea/vagrant-openshift.iml @@ -10,7 +10,9 @@ - + + + @@ -36,7 +38,7 @@ - + diff --git a/.idea/workspace.xml b/.idea/workspace.xml index e8c08d51..9e012231 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,20 +2,20 @@ - - - - - + + + + + - + - + @@ -55,7 +55,17 @@ - + + + + + + + + + + + @@ -73,9 +83,6 @@ @@ -123,6 +133,7 @@ + @@ -137,83 +148,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -223,21 +158,13 @@ - + + + + @@ -353,6 +279,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -365,15 +326,14 @@ - - + + - - + @@ -382,6 +342,7 @@ + @@ -448,114 +409,94 @@ - + - - - + - + - - - + - + - - - + - + - - - + - + - - - + - + - - - + - + - - - + - + - - - + - + - - - + - + - - - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/lib/vagrant-openshift/command/test.rb b/lib/vagrant-openshift/command/test.rb index f47dba4f..6d7cd744 100644 --- a/lib/vagrant-openshift/command/test.rb +++ b/lib/vagrant-openshift/command/test.rb @@ -25,6 +25,7 @@ def execute options = {} options[:help] = false options[:node] = false + options[:cart] = false options[:broker] = false options[:rhc] = false options[:console] = false @@ -39,6 +40,10 @@ def execute options[:node] = true end + o.on("-c", "--cart", String, "Run cartridge tests") do |f| + options[:cart] = true + end + o.on("-b", "--broker", String, "Run broker tests") do |f| options[:broker] = true end @@ -80,8 +85,8 @@ def execute exit end - if !(options[:broker] || options[:node] || options[:rhc] || options[:console]) - options[:node] = options[:broker] = options[:console] = options[:rhc] = true + if !(options[:broker] || options[:node] || options[:cart] || options[:rhc] || options[:console]) + options[:node] = options[:cart] = options[:broker] = options[:console] = options[:rhc] = true end with_target_vms(argv, :reverse => true) do |machine| diff --git a/lib/vagrant-openshift/provisioner.rb b/lib/vagrant-openshift/provisioner.rb index 0cf75a29..99e6fb32 100644 --- a/lib/vagrant-openshift/provisioner.rb +++ b/lib/vagrant-openshift/provisioner.rb @@ -45,7 +45,7 @@ def provision @machine.ui.info("Reapplying puppet script to update changed IP values") hostname = @machine.config.vm.hostname sudo(machine,"echo #{hostname} > /proc/sys/kernel/hostname") - sudo(machine,"puppet apply --verbose #{Vagrant::Openshift::Constants.build_dir + 'configure_origin.pp'}") + sudo(machine,"puppet apply --verbose #{Vagrant::Openshift::Constants.build_dir + 'configure_origin.pp'}", {timeout: 60*20}) is_fedora = @machine.communicate.test("test -e /etc/fedora-release") sudo(machine,Constants.restart_services_cmd(is_fedora).join("\n")) diff --git a/lib/vagrant-openshift/templates/builder/Rakefile b/lib/vagrant-openshift/templates/builder/Rakefile index a87d7c2b..cbeee432 100644 --- a/lib/vagrant-openshift/templates/builder/Rakefile +++ b/lib/vagrant-openshift/templates/builder/Rakefile @@ -177,18 +177,21 @@ task :run_tests do options[:fixme] = ENV["fixme"] == "true" if ENV["extended"] == "true" options[:node_extended] = ENV["node"] == "true" + options[:cart_extended] = ENV["cart"] == "true" options[:broker_extended] = ENV["broker"] == "true" options[:rhc_extended] = ENV["rhc"] == "true" options[:console_extended] = ENV["console"] == "true" - options[:exclude_node] = true - options[:exclude_broker] = true - options[:exclude_rhc] = true - options[:exclude_console] = true + options[:node] = false + options[:cart] = false + options[:broker] = false + options[:rhc] = false + options[:console] = false else - options[:exclude_node] = ENV["node"] != "true" - options[:exclude_broker] = ENV["broker"] != "true" - options[:exclude_rhc] = ENV["rhc"] != "true" - options[:exclude_console] = ENV["console"] != "true" + options[:node] = ENV["node"] == "true" + options[:cart] = ENV["cart"] == "true" + options[:broker] = ENV["broker"] == "true" + options[:rhc] = ENV["rhc"] == "true" + options[:console] = ENV["console"] == "true" end Test.new.test(options) diff --git a/lib/vagrant-openshift/templates/builder/lib/test.rb b/lib/vagrant-openshift/templates/builder/lib/test.rb index 93dc1df8..3c7a38b7 100644 --- a/lib/vagrant-openshift/templates/builder/lib/test.rb +++ b/lib/vagrant-openshift/templates/builder/lib/test.rb @@ -38,9 +38,16 @@ def test(options) if options[:node_extended] (1..3).each do |i| - test_queues[i-1] << build_cucumber_command("Extended Runtime Group #{i}", ["@runtime_extended#{i}"]) + test_queues[i-1] << build_cucumber_command("Extended Node Group #{i}", ["@node_extended#{i}"]) end - test_queues[3] << build_rake_command("OpenShift Runtime Functionals Ext", "cd /data/openshift-test/node; rake ext_func_test") + test_queues[3] << build_rake_command("OpenShift Runtime Node Functionals Ext", "cd /data/openshift-test/node; rake ext_node_func_test") + end + + if options[:cart_extended] + (1..3).each do |i| + test_queues[i-1] << build_cucumber_command("Extended Cart Group #{i}", ["@cart_extended#{i}"]) + end + test_queues[2] << build_rake_command("OpenShift Runtime Cartridge Functionals Ext", "cd /data/openshift-test/node; rake ext_cart_func_test") end if options[:rhc_extended] @@ -49,16 +56,16 @@ def test(options) nil,"/data/openshift-test/rhc/cucumber") end - unless options[:exclude_broker] + if options[:broker] test_queues[0] << build_rake_command("OpenShift Broker Sanity", "cd /data/openshift-test/broker; rake test:sanity", {}, false) if options[:fixme] test_queues[3] << build_rake_command("OpenShift Broker Units", "cd /data/openshift-test/broker; rake test:units", {}, false) - test_queues[0] << build_rake_command("OpenShift Broker Integration", "cd /data/openshift-test/broker; rake test:integration", {}, false) test_queues[2] << build_rake_command("OpenShift Broker Functional", "cd /data/openshift-test/broker; rake test:functionals", {}, false) - test_queues[1] << build_rake_command("OpenShift Admin Console Functional", "cd /data/openshift-test/broker; rake test:admin_console_functionals", {}, false) if options[:fixme] + test_queues[0] << build_rake_command("OpenShift Broker Integration", "cd /data/openshift-test/broker; rake test:integration", {}, false) + test_queues[1] << build_rake_command("OpenShift Admin Console Functional", "cd /data/openshift-test/broker; rake test:admin_console_functionals", {}, false) test_queues[3] << build_cucumber_command("Broker cucumber", ["@broker"]) end - unless options[:exclude_node] + if options[:node] test_queues[0] << build_rake_command("Runtime Functional", "cd /data/openshift-test/node; rake essentials_test", {}, false) test_queues[1] << build_rake_command("Runtime Frontend Plugin ApacheDB", "cd /data/openshift-test/plugins/frontend/apachedb; rake test", {}, false) test_queues[2] << build_rake_command("Runtime Frontend Plugin Apache Mod Rewrite", "cd /data/openshift-test/plugins/frontend/apache-mod-rewrite; rake test", {}, false) @@ -66,12 +73,18 @@ def test(options) test_queues[0] << build_rake_command("Runtime Frontend Plugin NodeJS Websocket", "cd /data/openshift-test/plugins/frontend/nodejs-websocket; rake test", {}, false) test_queues[1] << build_rake_command("Runtime Frontend Plugin Haproxy SNI Proxy", "cd /data/openshift-test/plugins/frontend/haproxy-sni-proxy; rake test", {}, false) test_queues[2] << build_rake_command("Runtime Unit", "cd /data/openshift-test/node; rake unit_test", {}, false) - (1..4).each do |i| - test_queues[i-1] << build_cucumber_command("Runtime Group #{i.to_s}", ["@runtime#{i.to_s}"]) + (1..3).each do |i| + test_queues[i] << build_cucumber_command("Node Group #{i.to_s}", ["@node#{i.to_s}"]) end end - unless options[:exclude_rhc] + if options[:cart] + (1..3).each do |i| + test_queues[i] << build_cucumber_command("Cartridge Group #{i.to_s}", ["@cartridge#{i.to_s}"]) + end + end + + if options[:rhc] if @is_fedora test_queues[0] << build_rake_command("RHC Spec", 'cd /data/openshift-test/rhc; bundle install --local && bundle exec rake spec', {"SKIP_RUNCON" => 1}, false) test_queues[0] << build_rake_command("RHC Features", %{ @@ -99,10 +112,14 @@ def test(options) #These are special tests that cannot be written to work concurrently singleton_queue = [] + idle_all_gears - unless options[:exclude_node] - idle_all_gears - singleton_queue << build_cucumber_command("Runtime singletons", ["@singleton"]) + if options[:node] + singleton_queue << build_cucumber_command("Runtime singletons", ["@node_singleton"]) + end + + if options[:cart] + singleton_queue << build_cucumber_command("Runtime singletons", ["@cart_singleton"]) end run_tests_with_retry([singleton_queue]) diff --git a/lib/vagrant-openshift/version.rb b/lib/vagrant-openshift/version.rb index 62e82e40..182e2d1c 100644 --- a/lib/vagrant-openshift/version.rb +++ b/lib/vagrant-openshift/version.rb @@ -16,6 +16,6 @@ module Vagrant module Openshift - VERSION = "0.0.7" + VERSION = "0.0.8" end end