awspec 0.75.1 → 0.75.2
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 +4 -4
- data/lib/awspec/generator.rb +1 -0
- data/lib/awspec/generator/spec/elasticsearch.rb +20 -17
- data/lib/awspec/helper/finder/elasticsearch.rb +3 -3
- data/lib/awspec/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc2c82413eb3cee4c14e3d2c01f2644a83ea17db
|
4
|
+
data.tar.gz: b00e6c88ee1b8744d6f043ad87cb7f0c376321ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92e63018b98c2be4d8a25bec3b1521783125c98d0f68aaafd046157c16b108299b6a4fa8ffcf2488ec4e3e6669cb1f4b575fe090f106845829716caa129d99b0
|
7
|
+
data.tar.gz: fd61c7868686629a9f1da1c31f1a89ce5a3cd2111e74a32d8a02f1e9e07041d880ebae81401afbe8bf7a744a1faaa89e8475bf6a58f54890eea20d0dc6c2a7b1
|
data/lib/awspec/generator.rb
CHANGED
@@ -26,6 +26,7 @@ require 'awspec/generator/spec/acm'
|
|
26
26
|
require 'awspec/generator/spec/cloudwatch_logs'
|
27
27
|
require 'awspec/generator/spec/alb'
|
28
28
|
require 'awspec/generator/spec/internet_gateway'
|
29
|
+
require 'awspec/generator/spec/elasticsearch'
|
29
30
|
|
30
31
|
# Doc
|
31
32
|
require 'awspec/generator/doc/type'
|
@@ -1,35 +1,38 @@
|
|
1
1
|
module Awspec::Generator
|
2
2
|
module Spec
|
3
|
-
class
|
3
|
+
class Elasticsearch
|
4
4
|
include Awspec::Helper::Finder
|
5
5
|
def generate_all
|
6
6
|
domains = select_all_elasticsearch_domains
|
7
|
-
raise 'Not Found Domain' if
|
8
|
-
ERB.new(domain_spec_template, nil, '-').result(binding).
|
7
|
+
raise 'Not Found Domain' if domains.empty?
|
8
|
+
ERB.new(domain_spec_template, nil, '-').result(binding).gsub(/^\n/, '')
|
9
9
|
end
|
10
10
|
|
11
11
|
def domain_spec_template
|
12
12
|
template = <<-'EOF'
|
13
|
-
<%
|
14
|
-
describe elasticsearch('<%= domain.domain_name %>') do
|
13
|
+
<% domains.each do |domain| %>
|
14
|
+
describe elasticsearch('<%= domain.domain_status.domain_name %>') do
|
15
15
|
it { should exist }
|
16
|
-
|
16
|
+
<% if domain.domain_status.created %>
|
17
17
|
it { should be_created }
|
18
|
-
|
19
|
-
|
18
|
+
<% end %>
|
19
|
+
<% if domain.domain_status.deleted %>
|
20
20
|
it { should be_deleted }
|
21
|
-
|
22
|
-
its(:elasticsearch_version) { should eq <%= domain.elasticsearch_version %> }
|
23
|
-
its('elasticsearch_cluster_config.instance_type') { should eq <%= domain.elasticsearch_cluster_config.instance_type %> }
|
24
|
-
its('ebs_options.ebs_enabled') { should eq <%= domain.ebs_options.ebs_enabled %> }
|
25
|
-
|
26
|
-
its('ebs_options.volume_type') { should eq <%= domain.ebs_options.
|
27
|
-
its('ebs_options.volume_size') { should eq <%= domain.ebs_options.
|
28
|
-
|
21
|
+
<% end %>
|
22
|
+
its(:elasticsearch_version) { should eq '<%= domain.domain_status.elasticsearch_version %>' }
|
23
|
+
its('elasticsearch_cluster_config.instance_type') { should eq '<%= domain.domain_status.elasticsearch_cluster_config.instance_type %>' }
|
24
|
+
its('ebs_options.ebs_enabled') { should eq <%= domain.domain_status.ebs_options.ebs_enabled %> }
|
25
|
+
<% if domain.domain_status.ebs_options.ebs_enabled -%>
|
26
|
+
its('ebs_options.volume_type') { should eq '<%= domain.domain_status.ebs_options.volume_type %>' }
|
27
|
+
its('ebs_options.volume_size') { should eq <%= domain.domain_status.ebs_options.volume_size %> }
|
28
|
+
<% end %>
|
29
29
|
it do
|
30
30
|
should have_access_policies <<-policy
|
31
|
-
<%= JSON.pretty_generate(JSON.load(domain.access_policies)) %>
|
31
|
+
<%= JSON.pretty_generate(JSON.load(domain.domain_status.access_policies)) %>
|
32
32
|
policy
|
33
|
+
end
|
34
|
+
end
|
35
|
+
<% end %>
|
33
36
|
EOF
|
34
37
|
template
|
35
38
|
end
|
@@ -9,9 +9,9 @@ module Awspec::Helper
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def select_all_elasticsearch_domains
|
12
|
-
domain_names =
|
13
|
-
domain_names.map do |
|
14
|
-
elasticsearch_client.describe_elasticsearch_domain(domain_name)
|
12
|
+
domain_names = elasticsearch_client.list_domain_names.domain_names
|
13
|
+
domain_names.map do |domain|
|
14
|
+
elasticsearch_client.describe_elasticsearch_domain(domain_name: domain.domain_name)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
data/lib/awspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.75.
|
4
|
+
version: 0.75.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k1LoW
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|