awspec 1.24.2 → 1.24.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/awspec/command/generate.rb +1 -1
- data/lib/awspec/generator.rb +1 -0
- data/lib/awspec/generator/spec/elasticache.rb +43 -0
- data/lib/awspec/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ac14ec851ce396f40316106c3784538793a8522009cc6d2172b71d01bc16691
|
4
|
+
data.tar.gz: 291660659e3c9223777f70e779c1d2ab34a591a4bfd83590002764977a70e73d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 411f890f896ba013a75805159318bca637f0c43f0cc2b62c9e745d3b3386a31ba24d2080c1f4821f6fd68d5392bd1003a03838f119fa156b28f1959d4016ef98
|
7
|
+
data.tar.gz: f9ee6a4015f25bb56b85ae3a741a628bc5985b4e85f04e92099faaa9fb14caf02d7e8a13ef6ec86e3e5cd51455fe0b1d7d6fcc6feed3853d88661233f4079afd
|
@@ -51,7 +51,7 @@ module Awspec
|
|
51
51
|
types_for_generate_all = %w(
|
52
52
|
cloudwatch_alarm cloudwatch_event directconnect ebs efs
|
53
53
|
elasticsearch iam_group iam_policy iam_role iam_user kms lambda
|
54
|
-
acm cloudwatch_logs eip codebuild
|
54
|
+
acm cloudwatch_logs eip codebuild elasticache
|
55
55
|
)
|
56
56
|
|
57
57
|
types_for_generate_all.each do |type|
|
data/lib/awspec/generator.rb
CHANGED
@@ -27,6 +27,7 @@ require 'awspec/generator/spec/cloudwatch_logs'
|
|
27
27
|
require 'awspec/generator/spec/alb'
|
28
28
|
require 'awspec/generator/spec/nlb'
|
29
29
|
require 'awspec/generator/spec/internet_gateway'
|
30
|
+
require 'awspec/generator/spec/elasticache'
|
30
31
|
require 'awspec/generator/spec/elasticsearch'
|
31
32
|
require 'awspec/generator/spec/eip'
|
32
33
|
require 'awspec/generator/spec/rds_db_parameter_group'
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Awspec::Generator
|
2
|
+
module Spec
|
3
|
+
class Elasticache
|
4
|
+
include Awspec::Helper::Finder
|
5
|
+
def generate_all
|
6
|
+
opt = {}
|
7
|
+
clusters = []
|
8
|
+
loop do
|
9
|
+
res = elasticache_client.describe_cache_clusters(opt)
|
10
|
+
clusters.push(*res.cache_clusters)
|
11
|
+
break if res.marker.nil?
|
12
|
+
opt = { marker: res.marker }
|
13
|
+
end
|
14
|
+
raise 'Not Found Cache Clusters' if clusters.empty?
|
15
|
+
ERB.new(cache_clusters_spec_template, nil, '-').result(binding).gsub(/^\n/, '')
|
16
|
+
end
|
17
|
+
|
18
|
+
def cache_clusters_spec_template
|
19
|
+
template = <<-'EOF'
|
20
|
+
<% clusters.each do |cluster| %>
|
21
|
+
describe elasticache('<%= cluster.cache_cluster_id %>') do
|
22
|
+
it { should exist }
|
23
|
+
it { should be_available }
|
24
|
+
it { should have_cache_parameter_group('<%= cluster.cache_parameter_group.cache_parameter_group_name %>') }
|
25
|
+
it { should belong_to_cache_subnet_group('<%= cluster.cache_subnet_group_name %>') }
|
26
|
+
<% unless cluster.replication_group_id.nil? %>
|
27
|
+
its(:replication_group_id) { should eq '<%= cluster.replication_group_id %>' }
|
28
|
+
<% end %>
|
29
|
+
its(:engine) { should eq '<%= cluster.engine %>' }
|
30
|
+
its(:engine_version) { should eq '<%= cluster.engine_version %>' }
|
31
|
+
its(:cache_node_type) { should eq '<%= cluster.cache_node_type %>' }
|
32
|
+
<% unless cluster.snapshot_retention_limit.nil? %>
|
33
|
+
its(:snapshot_retention_limit) { should eq <%= cluster.snapshot_retention_limit %> }
|
34
|
+
its(:snapshot_window) { should eq '<%= cluster.snapshot_window %>' }
|
35
|
+
<% end %>
|
36
|
+
end
|
37
|
+
<% end %>
|
38
|
+
EOF
|
39
|
+
template
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
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: 1.24.
|
4
|
+
version: 1.24.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k1LoW
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -435,6 +435,7 @@ files:
|
|
435
435
|
- lib/awspec/generator/spec/ec2.rb
|
436
436
|
- lib/awspec/generator/spec/efs.rb
|
437
437
|
- lib/awspec/generator/spec/eip.rb
|
438
|
+
- lib/awspec/generator/spec/elasticache.rb
|
438
439
|
- lib/awspec/generator/spec/elasticsearch.rb
|
439
440
|
- lib/awspec/generator/spec/elb.rb
|
440
441
|
- lib/awspec/generator/spec/iam_group.rb
|
@@ -749,7 +750,7 @@ homepage: https://github.com/k1LoW/awspec
|
|
749
750
|
licenses:
|
750
751
|
- MIT
|
751
752
|
metadata: {}
|
752
|
-
post_install_message:
|
753
|
+
post_install_message:
|
753
754
|
rdoc_options: []
|
754
755
|
require_paths:
|
755
756
|
- lib
|
@@ -764,8 +765,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
764
765
|
- !ruby/object:Gem::Version
|
765
766
|
version: '0'
|
766
767
|
requirements: []
|
767
|
-
rubygems_version: 3.
|
768
|
-
signing_key:
|
768
|
+
rubygems_version: 3.1.4
|
769
|
+
signing_key:
|
769
770
|
specification_version: 4
|
770
771
|
summary: RSpec tests for your AWS resources.
|
771
772
|
test_files: []
|