cf 4.1.5.rc3 → 4.1.5.rc4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cf/cli/app/start.rb +13 -6
- data/lib/cf/version.rb +1 -1
- data/spec/cf/cli/app/start_spec.rb +8 -6
- data/spec/integration/push_flow_spec.rb +4 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eeeab88cd5d4fe615841147f7951e324a24cba11
|
4
|
+
data.tar.gz: 9974b6699cd3dc29a66774fd7cc782741d41bc25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66e8bb42bfdf140307ad90600b6b58ffa91ff3bee947ed34ea7c7bb6d1d1287580e0239288a9f698ba702957a09d2d49f6cd7928f923c03d41e91e8abd1eeaa8
|
7
|
+
data.tar.gz: a91890e75b606f9826e3848b6c49f50d94d8c0232c3cad7f256e7fdc3a9bfd93981325d7462a8341d27ab38be36900a19e8540bb1c3497f36eb0692838458e6b
|
data/lib/cf/cli/app/start.rb
CHANGED
@@ -91,15 +91,16 @@ module CF::App
|
|
91
91
|
return
|
92
92
|
end
|
93
93
|
|
94
|
-
|
94
|
+
print("Checking status of app '#{c(app.name, :name)}'...")
|
95
95
|
|
96
96
|
seconds = 0
|
97
|
+
@first_time_after_staging_succeeded = true
|
97
98
|
|
98
99
|
begin
|
99
100
|
instances = []
|
100
101
|
while true
|
101
102
|
if any_instance_flapping?(instances) || seconds == APP_CHECK_LIMIT
|
102
|
-
err "
|
103
|
+
err "Push unsuccessful."
|
103
104
|
return
|
104
105
|
end
|
105
106
|
|
@@ -109,11 +110,11 @@ module CF::App
|
|
109
110
|
indented { print_instances_summary(instances) }
|
110
111
|
|
111
112
|
if all_instances_running?(instances)
|
112
|
-
line "#{c("
|
113
|
+
line "#{c("Push successful! App '#{app.name}' available at #{app.name}.#{app.domain}", :good)}"
|
113
114
|
return
|
114
115
|
end
|
115
116
|
rescue CFoundry::NotStaged
|
116
|
-
|
117
|
+
print (".")
|
117
118
|
end
|
118
119
|
|
119
120
|
sleep 1
|
@@ -133,6 +134,12 @@ module CF::App
|
|
133
134
|
end
|
134
135
|
|
135
136
|
def print_instances_summary(instances)
|
137
|
+
|
138
|
+
if @first_time_after_staging_succeeded
|
139
|
+
line
|
140
|
+
@first_time_after_staging_succeeded = false
|
141
|
+
end
|
142
|
+
|
136
143
|
counts = Hash.new { 0 }
|
137
144
|
instances.each do |i|
|
138
145
|
counts[i.state] += 1
|
@@ -148,8 +155,8 @@ module CF::App
|
|
148
155
|
total = instances.count
|
149
156
|
running = counts["RUNNING"].to_s.rjust(total.to_s.size)
|
150
157
|
|
151
|
-
ratio = "#{running}#{d("
|
152
|
-
line "#{ratio} #{states.join(", ")}"
|
158
|
+
ratio = "#{running}#{d(" of ")}#{total} instances running"
|
159
|
+
line "#{ratio} (#{states.join(", ")})"
|
153
160
|
end
|
154
161
|
end
|
155
162
|
end
|
data/lib/cf/version.rb
CHANGED
@@ -9,6 +9,9 @@ module CF
|
|
9
9
|
before do
|
10
10
|
stub_client_and_precondition
|
11
11
|
client.stub(:apps).and_return([app])
|
12
|
+
|
13
|
+
app.stub(:host).and_return("some_host")
|
14
|
+
app.stub(:domain).and_return("some_domain")
|
12
15
|
end
|
13
16
|
|
14
17
|
def execute_start_app
|
@@ -80,7 +83,7 @@ module CF
|
|
80
83
|
|
81
84
|
it "says app is started" do
|
82
85
|
execute_start_app
|
83
|
-
expect(output).to say("Checking #{app.name}...")
|
86
|
+
expect(output).to say("Checking status of app '#{app.name}'...")
|
84
87
|
expect(output).to say("1 running, 1 down")
|
85
88
|
expect(output).to say("2 running")
|
86
89
|
end
|
@@ -93,7 +96,7 @@ module CF
|
|
93
96
|
|
94
97
|
it "says the app failed to stage" do
|
95
98
|
execute_start_app
|
96
|
-
expect(output).to say("Checking #{app.name}...")
|
99
|
+
expect(output).to say("Checking status of app '#{app.name}'...")
|
97
100
|
expect(error_output).to say("Application failed to stage")
|
98
101
|
expect(output).to_not say(/\d (running|down|flapping)/)
|
99
102
|
end
|
@@ -112,8 +115,7 @@ module CF
|
|
112
115
|
|
113
116
|
it "keeps polling" do
|
114
117
|
execute_start_app
|
115
|
-
expect(output).to say("Checking #{app.name}...")
|
116
|
-
expect(output).to say("Staging in progress...")
|
118
|
+
expect(output).to say("Checking status of app '#{app.name}'...")
|
117
119
|
expect(output).to say("2 running")
|
118
120
|
end
|
119
121
|
end
|
@@ -127,10 +129,10 @@ module CF
|
|
127
129
|
|
128
130
|
it "says app failed to start" do
|
129
131
|
execute_start_app
|
130
|
-
expect(output).to say("Checking #{app.name}...")
|
132
|
+
expect(output).to say("Checking status of app '#{app.name}'...")
|
131
133
|
expect(output).to say("1 running, 1 down")
|
132
134
|
expect(output).to say("1 starting, 1 flapping")
|
133
|
-
expect(error_output).to say("
|
135
|
+
expect(error_output).to say("Push unsuccessful.")
|
134
136
|
end
|
135
137
|
end
|
136
138
|
end
|
@@ -95,9 +95,10 @@ if ENV["CF_V2_RUN_INTEGRATION"]
|
|
95
95
|
|
96
96
|
expect(runner).to say "Uploading #{app}... OK", 180
|
97
97
|
expect(runner).to say "Starting #{app}... OK", 180
|
98
|
-
expect(runner).to say "Checking #{app}...", 180
|
99
|
-
expect(runner).to say "1
|
100
|
-
expect(runner).to say "
|
98
|
+
expect(runner).to say "Checking status of app '#{app}'...", 180
|
99
|
+
expect(runner).to say "0 of 1 instances running (1 starting)"
|
100
|
+
expect(runner).to say "1 of 1 instances running"
|
101
|
+
expect(runner).to say "Push successful! App '#{app}' available at #{app}.a1-app.cf-app.com", 30
|
101
102
|
end
|
102
103
|
end
|
103
104
|
|