engineyard-cloud-client 1.0.9 → 1.0.10
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.
data/ChangeLog.md
CHANGED
@@ -20,6 +20,7 @@ class FakeAwsm < Sinatra::Base
|
|
20
20
|
Scenario::UnlinkedApp.new,
|
21
21
|
Scenario::TwoApps.new,
|
22
22
|
Scenario::LinkedApp.new,
|
23
|
+
Scenario::StuckDeployment.new,
|
23
24
|
Scenario::MultipleAmbiguousAccounts.new,
|
24
25
|
Scenario::LinkedAppNotRunning.new,
|
25
26
|
Scenario::LinkedAppRedMaster.new,
|
@@ -79,6 +79,13 @@ module Scenario
|
|
79
79
|
end
|
80
80
|
end # LinkedApp
|
81
81
|
|
82
|
+
class StuckDeployment < LinkedApp
|
83
|
+
def initialize(name = 'Stuck Deployment', email = 'stuck.deployment@test.local', pass = 'stuck')
|
84
|
+
super
|
85
|
+
@app_env.deployments.create({"ref" => "master", "migrate" => false})
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
82
89
|
class MultipleAmbiguousAccounts < LinkedApp
|
83
90
|
def initialize(name = 'Multiple Ambiguous Accounts', email = 'multiple.ambiguous.accounts@test.local', pass = 'multi')
|
84
91
|
super
|
@@ -109,37 +109,35 @@ describe EY::CloudClient::AppEnvironment do
|
|
109
109
|
deployment.finished
|
110
110
|
EY::CloudClient::Deployment.last(@api, @app_env).should == deployment
|
111
111
|
end
|
112
|
+
end
|
113
|
+
|
114
|
+
describe "canceling" do
|
115
|
+
before do
|
116
|
+
@api = scenario_cloud_client "Stuck Deployment"
|
117
|
+
result = EY::CloudClient::AppEnvironment.resolve(@api, 'app_name' => 'rails232app', 'environment_name' => 'giblets', 'account_name' => 'main')
|
118
|
+
result.should be_one_match
|
119
|
+
@app_env = result.matches.first
|
120
|
+
end
|
112
121
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
EY::CloudClient::Deployment.last(@api, @app_env).should be_finished
|
133
|
-
end
|
134
|
-
|
135
|
-
it "raises if the deployment is already finished" do
|
136
|
-
deployment = EY::CloudClient::Deployment.last(@api, @app_env)
|
137
|
-
deployment.out << "Test output"
|
138
|
-
deployment.successful = true
|
139
|
-
deployment.finished
|
140
|
-
deployment.should be_finished
|
141
|
-
expect { deployment.cancel }.to raise_error(EY::CloudClient::Error, "Previous deployment is already finished. Aborting.")
|
142
|
-
end
|
122
|
+
it "marks the deployment finish and unsuccessful with a message" do
|
123
|
+
deployment = EY::CloudClient::Deployment.last(@api, @app_env)
|
124
|
+
deployment.should_not be_finished
|
125
|
+
deployment.cancel
|
126
|
+
deployment.should be_finished
|
127
|
+
deployment.should_not be_successful
|
128
|
+
deployment.output.rewind
|
129
|
+
deployment.output.read.should =~ /Marked as canceled by Stuck Deployment/
|
130
|
+
|
131
|
+
EY::CloudClient::Deployment.last(@api, @app_env).should be_finished
|
132
|
+
end
|
133
|
+
|
134
|
+
it "raises if the deployment is already finished" do
|
135
|
+
deployment = EY::CloudClient::Deployment.last(@api, @app_env)
|
136
|
+
deployment.out << "Test output"
|
137
|
+
deployment.successful = true
|
138
|
+
deployment.finished
|
139
|
+
deployment.should be_finished
|
140
|
+
expect { deployment.cancel }.to raise_error(EY::CloudClient::Error, "Previous deployment is already finished. Aborting.")
|
143
141
|
end
|
144
142
|
end
|
145
143
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: engineyard-cloud-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -354,7 +354,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
354
354
|
version: '0'
|
355
355
|
segments:
|
356
356
|
- 0
|
357
|
-
hash: -
|
357
|
+
hash: -1988218974776192980
|
358
358
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
359
359
|
none: false
|
360
360
|
requirements:
|
@@ -363,7 +363,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
363
363
|
version: '0'
|
364
364
|
segments:
|
365
365
|
- 0
|
366
|
-
hash: -
|
366
|
+
hash: -1988218974776192980
|
367
367
|
requirements: []
|
368
368
|
rubyforge_project:
|
369
369
|
rubygems_version: 1.8.24
|