ops_manager_ui_drivers 2.32.1 → 2.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f06ae22ad1b7923fcbc5f5d243e23aabf5e290c2
4
- data.tar.gz: b93370c074796b460dc3100ddbdf0ad08400b5dd
3
+ metadata.gz: 43551addee8eee167e6494911c361efc19dfee8d
4
+ data.tar.gz: 9fd7ef93a4a402712c90f0e4f20b0b803ccb6258
5
5
  SHA512:
6
- metadata.gz: e743b584ebf814d1ea90030e3ac15c6ae978b2c096795ebcc12c72197ae86f773bb6e00f5e0a7ed7a22fab36eede714a43fbf4cca665797d747a906b1c08c34d
7
- data.tar.gz: 84913827284971a93a9e17bbef678d957482c8326cfa1c3b03bcd26e21b2c86e8cdb06e5825ffd049cb9961feb74a4da2f5474effc871ed3cbd422d1ed269f08
6
+ metadata.gz: 5e316f8b3ce74d66e27756775989f261ee569e8168058bf010cb2a8e4bc95ac18e1b0c05723d0cb893a81bf8da7bd9ac48df0035dfe91df35b30cdda88bf8822
7
+ data.tar.gz: da0bb8fa991fb931e6241b7ea1900b8e26c933a9b5dd2c5270fa3c1adce20922e96a313696eda085a7b8b33d692810716034bb39485fcdbfc9cfb4769a7fce7c
@@ -1,3 +1,3 @@
1
1
  module OpsManagerUiDrivers
2
- VERSION = '2.32.1'
2
+ VERSION = '2.33.0'
3
3
  end
@@ -49,13 +49,25 @@ module OpsManagerUiDrivers
49
49
  http.request(put('v0/staged/director/second_network', {second_network: {name: network_name}}.to_json, uaa_token.auth_header))
50
50
  end
51
51
 
52
+ def state_change_success?
53
+ if most_recent_installation_id.empty?
54
+ return false
55
+ end
56
+
57
+ state = JSON.parse(
58
+ http.request(get("v0/installations/#{most_recent_installation_id}", uaa_token.auth_header)).read_body
59
+ )['status']
60
+
61
+ if state == 'failed'
62
+ browser.fail_early('Installation failed!')
63
+ else
64
+ state == 'succeeded'
65
+ end
66
+ end
67
+
52
68
  def most_recent_installation_log
53
- all_installations = JSON.parse(
54
- http.request(get('v0/installations', uaa_token.auth_header)).read_body
55
- )['installations']
56
- return if all_installations.empty?
69
+ return if most_recent_installation_id.empty?
57
70
 
58
- most_recent_installation_id = all_installations.first['id']
59
71
  installation_log_path = "v0/installations/#{most_recent_installation_id}/logs"
60
72
 
61
73
  most_recent_installation_log = JSON.parse(http.request(get(installation_log_path, uaa_token.auth_header)).read_body)['logs']
@@ -63,6 +75,15 @@ module OpsManagerUiDrivers
63
75
  end
64
76
 
65
77
  private
78
+
79
+ def most_recent_installation_id
80
+ all_installations = JSON.parse(
81
+ http.request(get('v0/installations', uaa_token.auth_header)).read_body
82
+ )['installations']
83
+
84
+ all_installations.empty? ? '' : "#{all_installations.first['id']}"
85
+ end
86
+
66
87
  def uaa_uri
67
88
  if @host_uri.host == 'localhost' && @host_uri.port == 3000
68
89
  URI.parse('http://localhost:8080')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ops_manager_ui_drivers
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.32.1
4
+ version: 2.33.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pivotal, Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-07 00:00:00.000000000 Z
11
+ date: 2016-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport