class UiSpecRunner
Public Class Methods
new(environment:, om_version:)
click to toggle source
# File lib/opsmgr/ui_helpers/ui_spec_runner.rb, line 4 def initialize(environment:, om_version:) raise 'No Environment Name provided' if environment.nil? || environment.empty? raise 'No Ops Manager Version provided' if om_version.nil? || om_version.empty? ENV['ENVIRONMENT_NAME'] = environment ENV['OM_VERSION'] = om_version end
Public Instance Methods
add_first_user()
click to toggle source
# File lib/opsmgr/ui_helpers/ui_spec_runner.rb, line 12 def add_first_user run_spec([spec_path + '/add_first_user_spec.rb']) end
configure_microbosh()
click to toggle source
# File lib/opsmgr/ui_helpers/ui_spec_runner.rb, line 16 def configure_microbosh run_spec([microbosh_spec_path + '/configure_microbosh_spec.rb']) end
delete_installation()
click to toggle source
# File lib/opsmgr/ui_helpers/ui_spec_runner.rb, line 55 def delete_installation run_spec([spec_path + '/delete_installation_spec.rb']) end
delete_product(product_name, timeout, poll_interval)
click to toggle source
# File lib/opsmgr/ui_helpers/ui_spec_runner.rb, line 59 def delete_product(product_name, timeout, poll_interval) ENV['PRODUCT_NAME'] = product_name ENV['DELETE_TIMEOUT'] = timeout ENV['POLL_INTERVAL'] = poll_interval run_spec([spec_path + '/delete_product_spec.rb']) end
delete_product_if_present(product_name, timeout, poll_interval)
click to toggle source
# File lib/opsmgr/ui_helpers/ui_spec_runner.rb, line 67 def delete_product_if_present(product_name, timeout, poll_interval) ENV['PRODUCT_NAME'] = product_name ENV['DELETE_TIMEOUT'] = timeout ENV['POLL_INTERVAL'] = poll_interval run_spec([spec_path + '/delete_product_if_present_spec.rb']) end
export_installation(export_destination)
click to toggle source
# File lib/opsmgr/ui_helpers/ui_spec_runner.rb, line 45 def export_installation(export_destination) ENV['EXPORT_DESTINATION'] = export_destination run_spec([spec_path + '/export_installation_spec.rb']) end
get_latest_install_log()
click to toggle source
# File lib/opsmgr/ui_helpers/ui_spec_runner.rb, line 27 def get_latest_install_log run_spec([spec_path + '/get_latest_install_log_spec.rb']) end
import_stemcell(stemcell_file, product_name)
click to toggle source
# File lib/opsmgr/ui_helpers/ui_spec_runner.rb, line 75 def import_stemcell(stemcell_file, product_name) ENV['STEMCELL_FILE'] = stemcell_file ENV['PRODUCT_NAME'] = product_name run_spec([spec_path + '/import_stemcell_spec.rb']) end
post_import_configuration()
click to toggle source
# File lib/opsmgr/ui_helpers/ui_spec_runner.rb, line 51 def post_import_configuration run_spec([spec_path + '/post_import_configuration_spec.rb']) end
revert_staged_changes()
click to toggle source
# File lib/opsmgr/ui_helpers/ui_spec_runner.rb, line 91 def revert_staged_changes run_spec([spec_path + '/revert_staged_changes_spec.rb']) end
trigger_install(install_timeout, poll_interval)
click to toggle source
# File lib/opsmgr/ui_helpers/ui_spec_runner.rb, line 20 def trigger_install(install_timeout, poll_interval) ENV['INSTALL_TIMEOUT'] = install_timeout ENV['POLL_INTERVAL'] = poll_interval run_spec([spec_path + '/trigger_install_spec.rb']) end
uncheck_errands(product_name, errand_names)
click to toggle source
# File lib/opsmgr/ui_helpers/ui_spec_runner.rb, line 82 def uncheck_errands(product_name, errand_names) require 'json' ENV['PRODUCT_NAME'] = product_name ENV['ERRAND_NAMES'] = JSON.generate(errand_names) run_spec([spec_path + '/uncheck_errands_spec.rb']) end
upload_and_add_product(product_path, product_name)
click to toggle source
# File lib/opsmgr/ui_helpers/ui_spec_runner.rb, line 31 def upload_and_add_product(product_path, product_name) ENV['PRODUCT_PATH'] = product_path ENV['PRODUCT_NAME'] = product_name run_spec([spec_path + '/upload_and_add_product_spec.rb']) end
upload_and_upgrade_product(product_path, product_name)
click to toggle source
# File lib/opsmgr/ui_helpers/ui_spec_runner.rb, line 38 def upload_and_upgrade_product(product_path, product_name) ENV['PRODUCT_PATH'] = product_path ENV['PRODUCT_NAME'] = product_name run_spec([spec_path + '/upload_and_upgrade_product_spec.rb']) end
Private Instance Methods
microbosh_spec_path()
click to toggle source
# File lib/opsmgr/ui_helpers/ui_spec_runner.rb, line 101 def microbosh_spec_path File.join(spec_path, 'microbosh') end
run_spec(spec_to_run)
click to toggle source
# File lib/opsmgr/ui_helpers/ui_spec_runner.rb, line 105 def run_spec(spec_to_run) RSpecExiter.exit_rspec(RSpec::Core::Runner.run(spec_to_run)) end
spec_path()
click to toggle source
# File lib/opsmgr/ui_helpers/ui_spec_runner.rb, line 97 def spec_path File.dirname(__FILE__) end