Class: UiSpecRunner
- Inherits:
-
Object
- Object
- UiSpecRunner
- Defined in:
- lib/opsmgr/ui_helpers/ui_spec_runner.rb
Instance Method Summary collapse
- #add_first_user ⇒ Object
- #configure_microbosh ⇒ Object
- #delete_installation ⇒ Object
- #delete_product(product_name, timeout) ⇒ Object
- #delete_product_if_present(product_name, timeout) ⇒ Object
- #export_installation(export_destination) ⇒ Object
- #get_latest_install_log ⇒ Object
- #import_installation(import_file) ⇒ Object
- #import_stemcell(stemcell_file, product_name) ⇒ Object
-
#initialize(environment:, om_version:) ⇒ UiSpecRunner
constructor
A new instance of UiSpecRunner.
- #trigger_install(install_timeout) ⇒ Object
- #uncheck_errands(product_name, errand_names) ⇒ Object
- #upload_and_add_product(product_path, product_name) ⇒ Object
- #upload_and_upgrade_product(product_path, product_name) ⇒ Object
Constructor Details
#initialize(environment:, om_version:) ⇒ UiSpecRunner
Returns a new instance of UiSpecRunner.
4 5 6 7 8 9 10 |
# 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 |
Instance Method Details
#add_first_user ⇒ Object
12 13 14 |
# 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 ⇒ Object
16 17 18 |
# 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 ⇒ Object
56 57 58 |
# File 'lib/opsmgr/ui_helpers/ui_spec_runner.rb', line 56 def delete_installation run_spec([spec_path + '/delete_installation_spec.rb']) end |
#delete_product(product_name, timeout) ⇒ Object
60 61 62 63 64 65 |
# File 'lib/opsmgr/ui_helpers/ui_spec_runner.rb', line 60 def delete_product(product_name, timeout) ENV['PRODUCT_NAME'] = product_name ENV['DELETE_TIMEOUT'] = timeout run_spec([spec_path + '/delete_product_spec.rb']) end |
#delete_product_if_present(product_name, timeout) ⇒ Object
67 68 69 70 71 72 |
# File 'lib/opsmgr/ui_helpers/ui_spec_runner.rb', line 67 def delete_product_if_present(product_name, timeout) ENV['PRODUCT_NAME'] = product_name ENV['DELETE_TIMEOUT'] = timeout run_spec([spec_path + '/delete_product_if_present_spec.rb']) end |
#export_installation(export_destination) ⇒ Object
44 45 46 47 48 |
# File 'lib/opsmgr/ui_helpers/ui_spec_runner.rb', line 44 def export_installation(export_destination) ENV['EXPORT_DESTINATION'] = export_destination run_spec([spec_path + '/export_installation_spec.rb']) end |
#get_latest_install_log ⇒ Object
26 27 28 |
# File 'lib/opsmgr/ui_helpers/ui_spec_runner.rb', line 26 def get_latest_install_log run_spec([spec_path + '/get_latest_install_log_spec.rb']) end |
#import_installation(import_file) ⇒ Object
50 51 52 53 54 |
# File 'lib/opsmgr/ui_helpers/ui_spec_runner.rb', line 50 def import_installation(import_file) ENV['IMPORT_FILE'] = import_file run_spec([spec_path + '/import_installation_spec.rb']) end |
#import_stemcell(stemcell_file, product_name) ⇒ Object
74 75 76 77 78 79 |
# File 'lib/opsmgr/ui_helpers/ui_spec_runner.rb', line 74 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 |
#trigger_install(install_timeout) ⇒ Object
20 21 22 23 24 |
# File 'lib/opsmgr/ui_helpers/ui_spec_runner.rb', line 20 def trigger_install(install_timeout) ENV['INSTALL_TIMEOUT'] = install_timeout run_spec([spec_path + '/trigger_install_spec.rb']) end |
#uncheck_errands(product_name, errand_names) ⇒ Object
81 82 83 84 85 86 87 88 |
# File 'lib/opsmgr/ui_helpers/ui_spec_runner.rb', line 81 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) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/opsmgr/ui_helpers/ui_spec_runner.rb', line 30 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) ⇒ Object
37 38 39 40 41 42 |
# File 'lib/opsmgr/ui_helpers/ui_spec_runner.rb', line 37 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 |