lib/minke/tasks/cucumber.rb in minke-1.13.10 vs lib/minke/tasks/cucumber.rb in minke-1.13.11

- old
+ new

@@ -7,21 +7,23 @@ compose_file = @config.compose_file_for(@task_name) compose_file = File.expand_path(compose_file) compose = @docker_compose_factory.create compose_file unless compose_file == nil - run_with_block do + run_with_block do |pre_func, post_func| status = false begin compose.up + pre_func.call + server_address = @service_discovery.build_address(@task_settings.health_check) @health_check.wait_for_HTTPOK(server_address) unless @task_settings.health_check == nil - @shell_helper.execute "cucumber --color -f pretty #{get_features args}" rescue Exception => e raise ("Cucumber steps failed: #{e.message}") unless status == true ensure compose.down + post_func.call end end end def get_features args