beaker-aws 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,44 @@
1
+ require 'spec_helper'
2
+ require 'beaker/hypervisor/ec2_helper'
3
+
4
+ describe Beaker::EC2Helper do
5
+ context ".amiports" do
6
+ let(:ec2) { Beaker::EC2Helper }
7
+
8
+ let(:master_host) do
9
+ opts = { :snapshot => :pe, :roles => ['master'], :additional_ports => 9999 }
10
+ make_host('master', opts)
11
+ end
12
+
13
+ let(:database_host) do
14
+ opts = { :snapshot => :pe, :roles => ['database'], :additional_ports => [1111, 5432] }
15
+ make_host('database', opts)
16
+ end
17
+
18
+ let(:dashboard_host) do
19
+ opts = { :snapshot => :pe, :roles => ['dashboard'], :additional_ports => 2003 }
20
+ make_host('dashboard', opts)
21
+ end
22
+
23
+ let(:all_in_one_host) do
24
+ opts = { :snapshot => :pe, :roles => ['master', 'database', 'dashboard']}
25
+ make_host('all_in_one', opts)
26
+ end
27
+
28
+ it "can set ports for database host" do
29
+ expect(ec2.amiports(database_host)).to be === [22, 61613, 8139, 5432, 8080, 8081, 1111]
30
+ end
31
+
32
+ it "can set ports for master host" do
33
+ expect(ec2.amiports(master_host)).to be === [22, 61613, 8139, 8140, 8142, 9999]
34
+ end
35
+
36
+ it "can set ports for dashboard host" do
37
+ expect(ec2.amiports(dashboard_host)).to be === [22, 61613, 8139, 443, 4433, 4435, 2003]
38
+ end
39
+
40
+ it "can set ports for combined master/database/dashboard host" do
41
+ expect(ec2.amiports(all_in_one_host)).to be === [22, 61613, 8139, 5432, 8080, 8081, 8140, 8142, 443, 4433, 4435]
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,17 @@
1
+ require 'simplecov'
2
+ require 'rspec/its'
3
+ require 'beaker'
4
+
5
+ Dir.glob(Dir.pwd + '/lib/beaker/hypervisor/*.rb') {|file| require file}
6
+
7
+ # setup & require beaker's spec_helper.rb
8
+ beaker_gem_spec = Gem::Specification.find_by_name('beaker')
9
+ beaker_gem_dir = beaker_gem_spec.gem_dir
10
+ beaker_spec_path = File.join(beaker_gem_dir, 'spec')
11
+ $LOAD_PATH << beaker_spec_path
12
+ require File.join(beaker_spec_path, 'spec_helper.rb')
13
+
14
+ RSpec.configure do |config|
15
+ config.include TestFileHelpers
16
+ config.include HostHelpers
17
+ end
metadata ADDED
@@ -0,0 +1,218 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: beaker-aws
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Rishi Javia, Kevin Imber, Tony Vu
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-07-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '3.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec-its
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: fakefs
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '0.6'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '0.6'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '10.1'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '10.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: pry
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: '0.10'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: '0.10'
97
+ - !ruby/object:Gem::Dependency
98
+ name: yard
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ! '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: markdown
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ! '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: thin
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ! '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ! '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: stringify-hash
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ~>
144
+ - !ruby/object:Gem::Version
145
+ version: 0.0.0
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ~>
151
+ - !ruby/object:Gem::Version
152
+ version: 0.0.0
153
+ - !ruby/object:Gem::Dependency
154
+ name: aws-sdk-v1
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ~>
158
+ - !ruby/object:Gem::Version
159
+ version: '1.57'
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ~>
165
+ - !ruby/object:Gem::Version
166
+ version: '1.57'
167
+ description: For use for the Beaker acceptance testing tool
168
+ email:
169
+ - rishi.javia@puppet.com, kevin.imber@puppet.com, tony.vu@puppet.com
170
+ executables:
171
+ - beaker-aws
172
+ extensions: []
173
+ extra_rdoc_files: []
174
+ files:
175
+ - .gitignore
176
+ - .simplecov
177
+ - Gemfile
178
+ - LICENSE
179
+ - README.md
180
+ - Rakefile
181
+ - acceptance/config/nodes/hosts.yml
182
+ - aws.md
183
+ - beaker-aws.gemspec
184
+ - bin/beaker-aws
185
+ - config/image_templates/ec2.yaml
186
+ - ec2.md
187
+ - lib/beaker-aws/version.rb
188
+ - lib/beaker/hypervisor/aws_sdk.rb
189
+ - lib/beaker/hypervisor/ec2.rb
190
+ - lib/beaker/hypervisor/ec2_helper.rb
191
+ - spec/beaker/hypervisor/aws_sdk_spec.rb
192
+ - spec/beaker/hypervisor/ec2_helper_spec.rb
193
+ - spec/spec_helper.rb
194
+ homepage: https://github.com/puppetlabs/beaker-aws
195
+ licenses:
196
+ - Apache2
197
+ metadata: {}
198
+ post_install_message:
199
+ rdoc_options: []
200
+ require_paths:
201
+ - lib
202
+ required_ruby_version: !ruby/object:Gem::Requirement
203
+ requirements:
204
+ - - ! '>='
205
+ - !ruby/object:Gem::Version
206
+ version: '0'
207
+ required_rubygems_version: !ruby/object:Gem::Requirement
208
+ requirements:
209
+ - - ! '>='
210
+ - !ruby/object:Gem::Version
211
+ version: '0'
212
+ requirements: []
213
+ rubyforge_project:
214
+ rubygems_version: 2.4.6
215
+ signing_key:
216
+ specification_version: 4
217
+ summary: Beaker DSL Extension Helpers!
218
+ test_files: []