opsmgr 0.34.18 → 0.34.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 922897d2db04a60635f2e8790a2ebc7be2cf8591
4
- data.tar.gz: e74ac01e5f673bfe3b066ec0877bc3c8b38bcd8d
3
+ metadata.gz: f69c08a7b4935e82fbde3f4a3061bb405f6d2cb4
4
+ data.tar.gz: b205fb594fba5f1435164ab6968888a08da2b93c
5
5
  SHA512:
6
- metadata.gz: 58468c31908102cc727bb207e9c2c5d6e537df00c8d2ab77a3690aa4e49c5d38315e2e027ea85ac70b58821c3ad3c8236ab969f46583e6d0ae9f44e0b8233747
7
- data.tar.gz: 982ae9453bbf9ffb5a1720b4ba52052a59c5ed3a811305416ef205c06d50aeb990f56df3250870e3c9d1e60babfa6457ca085c19d1190939217afc72b0db1717
6
+ metadata.gz: 68e00bfbbfa0254874c9ebd106303ea86d18fdb0615dc6d39b5f1dab8712d28981a59c5139aaf2c03e7784f3beb73493f43f5748bd865ede1ed2a86fe0f66164
7
+ data.tar.gz: 568da5664657578a53d2a6ec0562d9bd6300d76a50f2cafcf704cbe204fe7d8be24129098edc2722904da565c5ee9a4c78a80f8c4377dd7077afd51bcbb26531
@@ -2,126 +2,9 @@ PROJECT_ROOT = File.expand_path(File.join(__dir__, '..'))
2
2
 
3
3
  require 'rspec'
4
4
  require 'ops_manager_ui_drivers'
5
- require 'capybara/webkit'
6
- require 'capybara/dsl'
7
5
  require 'yaml'
8
6
  require 'opsmgr/environments'
9
- require 'json'
10
-
11
- module SettingsHelper
12
- def product_path
13
- ENV.fetch('PRODUCT_PATH')
14
- end
15
-
16
- def product_name
17
- ENV.fetch('PRODUCT_NAME')
18
- end
19
-
20
- def export_destination_path
21
- ENV.fetch('EXPORT_DESTINATION')
22
- end
23
-
24
- def import_file_path
25
- ENV.fetch('IMPORT_FILE')
26
- end
27
-
28
- def stemcell_file_path
29
- ENV.fetch('STEMCELL_FILE')
30
- end
31
-
32
- def om_version
33
- ENV.fetch('OM_VERSION')
34
- end
35
-
36
- def install_timeout
37
- ENV.fetch('INSTALL_TIMEOUT').to_i
38
- end
39
-
40
- def poll_interval
41
- ENV.fetch('POLL_INTERVAL').to_i
42
- end
43
-
44
- def delete_timeout
45
- Integer(ENV.fetch('DELETE_TIMEOUT'))
46
- end
47
-
48
- def errand_names
49
- JSON.parse(ENV.fetch('ERRAND_NAMES'))
50
- end
51
-
52
- def ops_manager_driver
53
- configure_capybara(fetch_environment_settings['ops_manager']['url'])
54
- case om_version
55
- when '1.4'
56
- om_1_4(fetch_environment_settings['ops_manager']['url'])
57
- when '1.5'
58
- om_1_5(fetch_environment_settings['ops_manager']['url'])
59
- when '1.6'
60
- om_1_6(fetch_environment_settings['ops_manager']['url'])
61
- when '1.7'
62
- om_1_7(fetch_environment_settings['ops_manager']['url'])
63
- else
64
- fail "Unsupported Ops Manager Version #{om_version.inspect}"
65
- end
66
- end
67
-
68
- def ops_manager_api_driver
69
- env_settings = fetch_environment_settings
70
- case om_version
71
- when '1.4'
72
- api_1_4(
73
- host: env_settings['ops_manager']['url'],
74
- username: env_settings['ops_manager']['username'],
75
- password: env_settings['ops_manager']['password'],
76
- )
77
- when '1.5'
78
- api_1_5(
79
- host: env_settings['ops_manager']['url'],
80
- username: env_settings['ops_manager']['username'],
81
- password: env_settings['ops_manager']['password'],
82
- )
83
- when '1.6'
84
- api_1_6(
85
- host: env_settings['ops_manager']['url'],
86
- username: env_settings['ops_manager']['username'],
87
- password: env_settings['ops_manager']['password'],
88
- )
89
- when '1.7'
90
- api_1_7(
91
- host: env_settings['ops_manager']['url'],
92
- username: env_settings['ops_manager']['username'],
93
- password: env_settings['ops_manager']['password'],
94
- )
95
- else
96
- fail "Unsupported Ops Manager Version #{om_version.inspect}"
97
- end
98
- end
99
-
100
- def environment_name
101
- ENV.fetch('ENVIRONMENT_NAME')
102
- end
103
-
104
- def fetch_environment_settings
105
- Opsmgr::Environments.for(environment_name).settings
106
- end
107
-
108
- def configure_capybara(ops_manager_url)
109
- Capybara.configure do |c|
110
- c.default_driver = :webkit
111
- end
112
-
113
- begin
114
- Capybara::Webkit.configure do |c|
115
- c.allow_url(ops_manager_url)
116
- c.ignore_ssl_errors
117
- end
118
- rescue
119
- # Capybara says, "All configuration must take place before the driver starts"
120
- end
121
-
122
- page.current_window.resize_to(1024, 2600) # avoid overlapping footer spec failures
123
- end
124
- end
7
+ require_relative 'settings_helper'
125
8
 
126
9
  RSpec.configure do |config|
127
10
  config.fail_fast = true
@@ -0,0 +1,123 @@
1
+ require 'capybara/webkit'
2
+ require 'capybara/dsl'
3
+ require 'json'
4
+
5
+ module SettingsHelper
6
+ def product_path
7
+ ENV.fetch('PRODUCT_PATH')
8
+ end
9
+
10
+ def product_name
11
+ ENV.fetch('PRODUCT_NAME')
12
+ end
13
+
14
+ def export_destination_path
15
+ ENV.fetch('EXPORT_DESTINATION')
16
+ end
17
+
18
+ def import_file_path
19
+ ENV.fetch('IMPORT_FILE')
20
+ end
21
+
22
+ def stemcell_file_path
23
+ ENV.fetch('STEMCELL_FILE')
24
+ end
25
+
26
+ def om_version
27
+ ENV.fetch('OM_VERSION')
28
+ end
29
+
30
+ def install_timeout
31
+ ENV.fetch('INSTALL_TIMEOUT').to_i
32
+ end
33
+
34
+ def delete_timeout
35
+ Integer(ENV.fetch('DELETE_TIMEOUT'))
36
+ end
37
+
38
+ def errand_names
39
+ JSON.parse(ENV.fetch('ERRAND_NAMES'))
40
+ end
41
+
42
+ def poll_interval
43
+ ENV.fetch('POLL_INTERVAL').to_i
44
+ end
45
+
46
+
47
+ def ops_manager_driver
48
+ fail 'Include OpsManagerUiDrivers::PageHelpers' unless respond_to? :fetch_environment_settings
49
+
50
+ configure_capybara(fetch_environment_settings['ops_manager']['url'])
51
+ case om_version
52
+ when '1.4'
53
+ om_1_4(fetch_environment_settings['ops_manager']['url'])
54
+ when '1.5'
55
+ om_1_5(fetch_environment_settings['ops_manager']['url'])
56
+ when '1.6'
57
+ om_1_6(fetch_environment_settings['ops_manager']['url'])
58
+ when '1.7'
59
+ om_1_7(fetch_environment_settings['ops_manager']['url'])
60
+ else
61
+ fail "Unsupported Ops Manager Version #{om_version.inspect}"
62
+ end
63
+ end
64
+
65
+ def ops_manager_api_driver
66
+ fail 'Include OpsManagerUiDrivers::PageHelpers' unless respond_to? :fetch_environment_settings
67
+
68
+ env_settings = fetch_environment_settings
69
+ case om_version
70
+ when '1.4'
71
+ api_1_4(
72
+ host: env_settings['ops_manager']['url'],
73
+ username: env_settings['ops_manager']['username'],
74
+ password: env_settings['ops_manager']['password'],
75
+ )
76
+ when '1.5'
77
+ api_1_5(
78
+ host: env_settings['ops_manager']['url'],
79
+ username: env_settings['ops_manager']['username'],
80
+ password: env_settings['ops_manager']['password'],
81
+ )
82
+ when '1.6'
83
+ api_1_6(
84
+ host: env_settings['ops_manager']['url'],
85
+ username: env_settings['ops_manager']['username'],
86
+ password: env_settings['ops_manager']['password'],
87
+ )
88
+ when '1.7'
89
+ api_1_7(
90
+ host: env_settings['ops_manager']['url'],
91
+ username: env_settings['ops_manager']['username'],
92
+ password: env_settings['ops_manager']['password'],
93
+ )
94
+ else
95
+ fail "Unsupported Ops Manager Version #{om_version.inspect}"
96
+ end
97
+ end
98
+
99
+ def environment_name
100
+ ENV.fetch('ENVIRONMENT_NAME')
101
+ end
102
+
103
+ def fetch_environment_settings
104
+ Opsmgr::Environments.for(environment_name).settings
105
+ end
106
+
107
+ def configure_capybara(ops_manager_url)
108
+ Capybara.configure do |c|
109
+ c.default_driver = :webkit
110
+ end
111
+
112
+ begin
113
+ Capybara::Webkit.configure do |c|
114
+ c.allow_url(ops_manager_url)
115
+ c.ignore_ssl_errors
116
+ end
117
+ rescue
118
+ # Capybara says, "All configuration must take place before the driver starts"
119
+ end
120
+
121
+ page.current_window.resize_to(1024, 2600) # avoid overlapping footer spec failures
122
+ end
123
+ end
@@ -1,5 +1,5 @@
1
1
  module Opsmgr
2
- VERSION = '0.34.18'.freeze
2
+ VERSION = '0.34.19'.freeze
3
3
  end
4
4
  # Copyright (c) 2014-2015 Pivotal Software, Inc.
5
5
  # All rights reserved.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opsmgr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.18
4
+ version: 0.34.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Release Engineering
@@ -358,6 +358,7 @@ files:
358
358
  - lib/opsmgr/ui_helpers/import_stemcell_spec.rb
359
359
  - lib/opsmgr/ui_helpers/microbosh/configure_microbosh_spec.rb
360
360
  - lib/opsmgr/ui_helpers/post_import_configuration_spec.rb
361
+ - lib/opsmgr/ui_helpers/settings_helper.rb
361
362
  - lib/opsmgr/ui_helpers/trigger_install_spec.rb
362
363
  - lib/opsmgr/ui_helpers/ui_spec_runner.rb
363
364
  - lib/opsmgr/ui_helpers/uncheck_errands_spec.rb