schemata-dea 0.0.1.beta14 → 0.0.1.beta15
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/schemata/common/componentbase.rb +42 -0
- data/lib/schemata/common/msgbase.rb +13 -11
- data/lib/schemata/common/msgtypebase.rb +20 -0
- data/lib/schemata/common/parsed_msg.rb +1 -1
- data/lib/schemata/dea/advertise_message/advertise_message_v1.rb +1 -1
- data/lib/schemata/dea/advertise_message.rb +1 -5
- data/lib/schemata/dea/dea_status_response/dea_status_response_v1.rb +1 -1
- data/lib/schemata/dea/dea_status_response.rb +1 -5
- data/lib/schemata/dea/discover_request/discover_request_v1.rb +1 -1
- data/lib/schemata/dea/discover_request.rb +1 -5
- data/lib/schemata/dea/droplet_status_response/droplet_status_response_v1.rb +1 -1
- data/lib/schemata/dea/droplet_status_response.rb +1 -5
- data/lib/schemata/dea/exit_message/exit_message_v1.rb +1 -1
- data/lib/schemata/dea/exit_message.rb +1 -5
- data/lib/schemata/dea/find_droplet_request/find_droplet_request_v1.rb +1 -1
- data/lib/schemata/dea/find_droplet_request.rb +1 -5
- data/lib/schemata/dea/find_droplet_response/find_droplet_response_v1.rb +1 -1
- data/lib/schemata/dea/find_droplet_response.rb +1 -5
- data/lib/schemata/dea/heartbeat_response/heartbeat_response_v1.rb +1 -1
- data/lib/schemata/dea/heartbeat_response.rb +1 -5
- data/lib/schemata/dea/hello_message/hello_message_v1.rb +1 -1
- data/lib/schemata/dea/hello_message.rb +1 -5
- data/lib/schemata/dea/start_request/start_request_v1.rb +5 -3
- data/lib/schemata/dea/start_request.rb +1 -5
- data/lib/schemata/dea/stop_request/stop_request_v1.rb +1 -1
- data/lib/schemata/dea/stop_request.rb +1 -5
- data/lib/schemata/dea/update_request/update_request_v1.rb +1 -1
- data/lib/schemata/dea/update_request.rb +1 -5
- data/lib/schemata/dea/version.rb +2 -2
- data/lib/schemata/dea.rb +3 -60
- data/lib/schemata/helpers/decamelize.rb +23 -0
- data/lib/schemata/helpers/hash_copy.rb +1 -1
- data/lib/schemata/helpers/stringify.rb +1 -1
- data/spec/{cloud_controller/cloud_controller_spec.rb → cloud_controller_spec.rb} +0 -0
- data/spec/common/helpers_spec.rb +16 -16
- data/spec/{dea/dea_spec.rb → dea_spec.rb} +1 -1
- data/spec/{health_manager/health_manager_spec.rb → health_manager_spec.rb} +0 -0
- data/spec/{router/router_spec.rb → router_spec.rb} +0 -0
- data/spec/{staging/staging_spec.rb → staging_spec.rb} +0 -0
- data/spec/support/component_helpers.rb +16 -2
- data/spec/support/helpers.rb +0 -20
- data/spec/support/message_helpers.rb +23 -19
- data/spec/support/message_type_helpers.rb +59 -55
- metadata +36 -80
- data/spec/cloud_controller/droplet_updated_message_spec.rb +0 -10
- data/spec/cloud_controller/hm_start_request_spec.rb +0 -11
- data/spec/cloud_controller/hm_stop_request_spec.rb +0 -12
- data/spec/dea/advertise_message_spec.rb +0 -10
- data/spec/dea/dea_status_response_spec.rb +0 -10
- data/spec/dea/discover_request_spec.rb +0 -10
- data/spec/dea/droplet_status_response_spec.rb +0 -10
- data/spec/dea/exit_message_spec.rb +0 -10
- data/spec/dea/find_droplet_request_spec.rb +0 -27
- data/spec/dea/find_droplet_response_spec.rb +0 -10
- data/spec/dea/heartbeat_response_spec.rb +0 -10
- data/spec/dea/hello_message_spec.rb +0 -10
- data/spec/dea/start_request_spec.rb +0 -10
- data/spec/dea/stop_request_spec.rb +0 -10
- data/spec/dea/update_request_spec.rb +0 -0
- data/spec/health_manager/health_request_spec.rb +0 -12
- data/spec/health_manager/health_response_spec.rb +0 -12
- data/spec/health_manager/status_crashed_response_spec.rb +0 -12
- data/spec/health_manager/status_flapping_response_spec.rb +0 -12
- data/spec/health_manager/status_request_spec.rb +0 -12
- data/spec/router/register_request_spec.rb +0 -10
- data/spec/router/start_message_spec.rb +0 -10
- data/spec/staging/staging_message_spec.rb +0 -14
@@ -1,27 +0,0 @@
|
|
1
|
-
require 'schemata/dea'
|
2
|
-
require 'spec_helper'
|
3
|
-
|
4
|
-
describe Schemata::DEA::FindDropletRequest do
|
5
|
-
it_behaves_like "a message type"
|
6
|
-
end
|
7
|
-
|
8
|
-
describe Schemata::DEA::FindDropletRequest::V1 do
|
9
|
-
it_behaves_like "a message"
|
10
|
-
|
11
|
-
it "should stringify the 'states' field when it is given to the constructor as a symbol" do
|
12
|
-
hash = {
|
13
|
-
"droplet" => "deadbeef",
|
14
|
-
"states" => [:RUNNING],
|
15
|
-
"version" => "0.1.0",
|
16
|
-
}
|
17
|
-
|
18
|
-
msg_obj = Schemata::DEA::FindDropletRequest::V1.new(hash)
|
19
|
-
msg_obj.states.should =~ ["RUNNING"]
|
20
|
-
end
|
21
|
-
|
22
|
-
it "should stringify the 'states' field when a symbold is passed ot the attr writer" do
|
23
|
-
msg_obj = Schemata::DEA.mock_find_droplet_request
|
24
|
-
msg_obj.states = [:RUNNING]
|
25
|
-
msg_obj.states.should =~ ["RUNNING"]
|
26
|
-
end
|
27
|
-
end
|
File without changes
|
@@ -1,12 +0,0 @@
|
|
1
|
-
require 'schemata/health_manager'
|
2
|
-
require 'spec_helper'
|
3
|
-
|
4
|
-
describe Schemata::HealthManager::HealthRequest do
|
5
|
-
it_behaves_like "a message type"
|
6
|
-
end
|
7
|
-
|
8
|
-
Schemata::HealthManager::HealthRequest.versions.each do |v|
|
9
|
-
describe Schemata::HealthManager::HealthRequest::const_get("V#{v}") do
|
10
|
-
it_behaves_like "a message"
|
11
|
-
end
|
12
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
require 'schemata/health_manager'
|
2
|
-
require 'spec_helper'
|
3
|
-
|
4
|
-
describe Schemata::HealthManager::HealthResponse do
|
5
|
-
it_behaves_like "a message type"
|
6
|
-
end
|
7
|
-
|
8
|
-
Schemata::HealthManager::HealthResponse.versions.each do |v|
|
9
|
-
describe Schemata::HealthManager::HealthResponse::const_get("V#{v}") do
|
10
|
-
it_behaves_like "a message"
|
11
|
-
end
|
12
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
require 'schemata/health_manager'
|
2
|
-
require 'spec_helper'
|
3
|
-
|
4
|
-
describe Schemata::HealthManager::StatusCrashedResponse do
|
5
|
-
it_behaves_like "a message type"
|
6
|
-
end
|
7
|
-
|
8
|
-
Schemata::HealthManager::StatusCrashedResponse.versions.each do |v|
|
9
|
-
describe Schemata::HealthManager::StatusCrashedResponse::const_get("V#{v}") do
|
10
|
-
it_behaves_like "a message"
|
11
|
-
end
|
12
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
require 'schemata/health_manager'
|
2
|
-
require 'spec_helper'
|
3
|
-
|
4
|
-
describe Schemata::HealthManager::StatusFlappingResponse do
|
5
|
-
it_behaves_like "a message type"
|
6
|
-
end
|
7
|
-
|
8
|
-
Schemata::HealthManager::StatusFlappingResponse.versions.each do |v|
|
9
|
-
describe Schemata::HealthManager::StatusFlappingResponse::const_get("V#{v}") do
|
10
|
-
it_behaves_like "a message"
|
11
|
-
end
|
12
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
require 'schemata/health_manager'
|
2
|
-
require 'spec_helper'
|
3
|
-
|
4
|
-
describe Schemata::HealthManager::StatusRequest do
|
5
|
-
it_behaves_like "a message type"
|
6
|
-
end
|
7
|
-
|
8
|
-
Schemata::HealthManager::StatusRequest.versions.each do |v|
|
9
|
-
describe Schemata::HealthManager::StatusRequest::const_get("V#{v}") do
|
10
|
-
it_behaves_like "a message"
|
11
|
-
end
|
12
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
require 'schemata/staging'
|
2
|
-
require 'spec_helper'
|
3
|
-
|
4
|
-
describe Schemata::Staging::Message do
|
5
|
-
it_behaves_like "a message type"
|
6
|
-
end
|
7
|
-
|
8
|
-
describe Schemata::Staging::Message::V1 do
|
9
|
-
it_behaves_like "a message"
|
10
|
-
end
|
11
|
-
|
12
|
-
describe Schemata::Staging::Message::V2 do
|
13
|
-
it_behaves_like "a message"
|
14
|
-
end
|