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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 846285926375fd9f812d6110b9b6f82918a1cd217dde0b51e3e87694fa39861c
4
- data.tar.gz: b9b0d5c955add005d788b35ace982d75a74843cb8bb0c4cc86cbf931bb6cb68e
3
+ metadata.gz: 9ac14ec851ce396f40316106c3784538793a8522009cc6d2172b71d01bc16691
4
+ data.tar.gz: 291660659e3c9223777f70e779c1d2ab34a591a4bfd83590002764977a70e73d
5
5
  SHA512:
6
- metadata.gz: 6d2af549c10d9e3634e6e7ff809b6bb3a5518dc3a9ae52e70963718a19aa2731cd274b9bbbba614989b49253eb85e4f806487692c7a7f72c7135dda58162fb5b
7
- data.tar.gz: 0aa25037fc049461e9558c57af0b7f6ab02b70cb43b4637496edfb7715704d8abd821b2f52bebc7a4a2ea3bf6ba95d5d9034102084667d249dce7f8584ee8a97
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|
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Awspec
2
- VERSION = '1.24.2'
2
+ VERSION = '1.24.3'
3
3
  end
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.2
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-04 00:00:00.000000000 Z
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.0.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: []