kitchen-linode 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ci.yml +38 -0
- data/.gitignore +1 -0
- data/.kitchen.yml +68 -0
- data/.rubocop.yml +2 -1155
- data/Gemfile +3 -1
- data/README.md +75 -67
- data/Rakefile +14 -10
- data/kitchen-linode.gemspec +21 -17
- data/lib/kitchen/driver/linode.rb +236 -193
- data/lib/kitchen/driver/linode_version.rb +1 -2
- data/spec/kitchen/driver/linode_spec.rb +258 -94
- data/spec/mocks/create.txt +67 -0
- data/spec/mocks/create_bad.txt +26 -0
- data/spec/mocks/create_ratelimit.txt +26 -0
- data/spec/mocks/create_timeout.txt +25 -0
- data/spec/mocks/delete.txt +27 -0
- data/spec/mocks/list.txt +34 -0
- data/spec/mocks/view.txt +67 -0
- data/spec/spec_helper.rb +39 -2
- metadata +106 -25
- data/.tailor +0 -4
- data/.travis.yml +0 -11
data/spec/mocks/view.txt
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx
|
3
|
+
Date: Thu, 30 Jun 2022 15:27:26 GMT
|
4
|
+
Content-Type: application/json
|
5
|
+
Connection: keep-alive
|
6
|
+
Cache-Control: private, max-age=0, s-maxage=0, no-cache, no-store, private, max-age=60, s-maxage=60
|
7
|
+
X-OAuth-Scopes: images:read_only linodes:read_write stackscripts:read_only
|
8
|
+
X-Accepted-OAuth-Scopes: linodes:read_only
|
9
|
+
X-Frame-Options: DENY, DENY
|
10
|
+
Access-Control-Allow-Origin: *
|
11
|
+
Access-Control-Allow-Methods: HEAD, GET, OPTIONS, POST, PUT, DELETE
|
12
|
+
Access-Control-Allow-Headers: Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter
|
13
|
+
X-Spec-Version: 4.129.0
|
14
|
+
Vary: Authorization, X-Filter, Authorization, X-Filter
|
15
|
+
X-Customer-UUID: DEADBEEF-DEAD-BEEF-DEADBEEFDEADBEEF
|
16
|
+
X-RateLimit-Limit: 800
|
17
|
+
X-RateLimit-Remaining: 799
|
18
|
+
X-RateLimit-Reset: 1656602917
|
19
|
+
Retry-After: 60
|
20
|
+
Access-Control-Allow-Credentials: true
|
21
|
+
Access-Control-Expose-Headers: X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status
|
22
|
+
Content-Security-Policy: default-src 'none'
|
23
|
+
X-Content-Type-Options: nosniff
|
24
|
+
X-XSS-Protection: 1; mode=block
|
25
|
+
Strict-Transport-Security: max-age=31536000
|
26
|
+
|
27
|
+
{
|
28
|
+
"alerts": {
|
29
|
+
"cpu": 90,
|
30
|
+
"io": 10000,
|
31
|
+
"network_in": 10,
|
32
|
+
"network_out": 10,
|
33
|
+
"transfer_quota": 80
|
34
|
+
},
|
35
|
+
"backups": {
|
36
|
+
"enabled": false,
|
37
|
+
"last_successful": null,
|
38
|
+
"schedule": {
|
39
|
+
"day": null,
|
40
|
+
"window": null
|
41
|
+
}
|
42
|
+
},
|
43
|
+
"created": "2022-06-30T15:22:14",
|
44
|
+
"group": "",
|
45
|
+
"hypervisor": "kvm",
|
46
|
+
"id": 73577357,
|
47
|
+
"image": "<%= image %>",
|
48
|
+
"ipv4": [
|
49
|
+
"203.0.113.243"
|
50
|
+
],
|
51
|
+
"ipv6": "2001:db8::f03c:93ff:fe92:5e2b/128",
|
52
|
+
"label": "<%= label %>",
|
53
|
+
"region": "<%= region %>",
|
54
|
+
"specs": {
|
55
|
+
"disk": 25600,
|
56
|
+
"memory": 1024,
|
57
|
+
"transfer": 1000,
|
58
|
+
"vcpus": 1
|
59
|
+
},
|
60
|
+
"status": "running",
|
61
|
+
"tags": [
|
62
|
+
"kitchen"
|
63
|
+
],
|
64
|
+
"type": "<%= type %>",
|
65
|
+
"updated": "2022-06-30T15:22:14",
|
66
|
+
"watchdog_enabled": true
|
67
|
+
}
|
data/spec/spec_helper.rb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
|
-
require "
|
2
|
-
|
1
|
+
require "erb"
|
2
|
+
require "rspec"
|
3
|
+
require "webmock/rspec"
|
4
|
+
require "simplecov"
|
5
|
+
require "fog/json"
|
6
|
+
SimpleCov.start
|
3
7
|
|
4
8
|
RSpec.configure do |config|
|
5
9
|
|
@@ -12,3 +16,36 @@ RSpec.configure do |config|
|
|
12
16
|
end
|
13
17
|
|
14
18
|
end
|
19
|
+
|
20
|
+
WebMock.disable_net_connect!(allow_localhost: true)
|
21
|
+
|
22
|
+
def create_response(request)
|
23
|
+
request_body = Fog::JSON.decode(request.body)
|
24
|
+
template = ERB.new File.read(File.join(File.dirname(__FILE__), "mocks", "create.txt"))
|
25
|
+
template.result(binding)
|
26
|
+
end
|
27
|
+
|
28
|
+
def create_bad_response
|
29
|
+
File.read(File.join(File.dirname(__FILE__), "mocks", "create_bad.txt"))
|
30
|
+
end
|
31
|
+
|
32
|
+
def create_ratelimit_response
|
33
|
+
File.read(File.join(File.dirname(__FILE__), "mocks", "create_ratelimit.txt"))
|
34
|
+
end
|
35
|
+
|
36
|
+
def create_timeout_response
|
37
|
+
File.read(File.join(File.dirname(__FILE__), "mocks", "create_timeout.txt"))
|
38
|
+
end
|
39
|
+
|
40
|
+
def delete_response
|
41
|
+
File.read(File.join(File.dirname(__FILE__), "mocks", "delete.txt"))
|
42
|
+
end
|
43
|
+
|
44
|
+
def list_response
|
45
|
+
File.read(File.join(File.dirname(__FILE__), "mocks", "list.txt"))
|
46
|
+
end
|
47
|
+
|
48
|
+
def view_response(label, region, image, type)
|
49
|
+
template = ERB.new File.read(File.join(File.dirname(__FILE__), "mocks", "view.txt"))
|
50
|
+
template.result(binding)
|
51
|
+
end
|
metadata
CHANGED
@@ -1,99 +1,167 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-linode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Taylor
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: fog-linode
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.0.1.rc2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.0.1.rc2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: retryable
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2.0'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '4.0'
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- - "
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '2.0'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '4.0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: test-kitchen
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '1.4'
|
54
|
+
- - "<"
|
39
55
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
56
|
+
version: '4'
|
57
|
+
type: :runtime
|
58
|
+
prerelease: false
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '1.4'
|
64
|
+
- - "<"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '4'
|
41
67
|
- !ruby/object:Gem::Dependency
|
42
68
|
name: bundler
|
69
|
+
requirement: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
74
|
+
type: :development
|
75
|
+
prerelease: false
|
76
|
+
version_requirements: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: chefstyle
|
83
|
+
requirement: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - '='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: 2.2.2
|
88
|
+
type: :development
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - '='
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: 2.2.2
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: countloc
|
43
97
|
requirement: !ruby/object:Gem::Requirement
|
44
98
|
requirements:
|
45
99
|
- - "~>"
|
46
100
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
101
|
+
version: '0.4'
|
48
102
|
type: :development
|
49
103
|
prerelease: false
|
50
104
|
version_requirements: !ruby/object:Gem::Requirement
|
51
105
|
requirements:
|
52
106
|
- - "~>"
|
53
107
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
108
|
+
version: '0.4'
|
55
109
|
- !ruby/object:Gem::Dependency
|
56
110
|
name: rake
|
111
|
+
requirement: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - ">="
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '0'
|
116
|
+
type: :development
|
117
|
+
prerelease: false
|
118
|
+
version_requirements: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0'
|
123
|
+
- !ruby/object:Gem::Dependency
|
124
|
+
name: rspec
|
57
125
|
requirement: !ruby/object:Gem::Requirement
|
58
126
|
requirements:
|
59
127
|
- - "~>"
|
60
128
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
129
|
+
version: '3.8'
|
62
130
|
type: :development
|
63
131
|
prerelease: false
|
64
132
|
version_requirements: !ruby/object:Gem::Requirement
|
65
133
|
requirements:
|
66
134
|
- - "~>"
|
67
135
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
136
|
+
version: '3.8'
|
69
137
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
138
|
+
name: simplecov
|
71
139
|
requirement: !ruby/object:Gem::Requirement
|
72
140
|
requirements:
|
73
141
|
- - "~>"
|
74
142
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
143
|
+
version: '0.9'
|
76
144
|
type: :development
|
77
145
|
prerelease: false
|
78
146
|
version_requirements: !ruby/object:Gem::Requirement
|
79
147
|
requirements:
|
80
148
|
- - "~>"
|
81
149
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
150
|
+
version: '0.9'
|
83
151
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
152
|
+
name: webmock
|
85
153
|
requirement: !ruby/object:Gem::Requirement
|
86
154
|
requirements:
|
87
155
|
- - "~>"
|
88
156
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
157
|
+
version: '3.5'
|
90
158
|
type: :development
|
91
159
|
prerelease: false
|
92
160
|
version_requirements: !ruby/object:Gem::Requirement
|
93
161
|
requirements:
|
94
162
|
- - "~>"
|
95
163
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
164
|
+
version: '3.5'
|
97
165
|
description: A Test Kitchen Driver for Linode
|
98
166
|
email:
|
99
167
|
- btaylor@linode.com
|
@@ -103,10 +171,10 @@ extra_rdoc_files: []
|
|
103
171
|
files:
|
104
172
|
- ".cane"
|
105
173
|
- ".codeclimate.yml"
|
174
|
+
- ".github/workflows/ci.yml"
|
106
175
|
- ".gitignore"
|
176
|
+
- ".kitchen.yml"
|
107
177
|
- ".rubocop.yml"
|
108
|
-
- ".tailor"
|
109
|
-
- ".travis.yml"
|
110
178
|
- CHANGELOG.md
|
111
179
|
- Gemfile
|
112
180
|
- LICENSE.md
|
@@ -116,6 +184,13 @@ files:
|
|
116
184
|
- lib/kitchen/driver/linode.rb
|
117
185
|
- lib/kitchen/driver/linode_version.rb
|
118
186
|
- spec/kitchen/driver/linode_spec.rb
|
187
|
+
- spec/mocks/create.txt
|
188
|
+
- spec/mocks/create_bad.txt
|
189
|
+
- spec/mocks/create_ratelimit.txt
|
190
|
+
- spec/mocks/create_timeout.txt
|
191
|
+
- spec/mocks/delete.txt
|
192
|
+
- spec/mocks/list.txt
|
193
|
+
- spec/mocks/view.txt
|
119
194
|
- spec/spec_helper.rb
|
120
195
|
homepage: https://github.com/ssplatt/kitchen-linode
|
121
196
|
licenses:
|
@@ -129,18 +204,24 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
129
204
|
requirements:
|
130
205
|
- - ">="
|
131
206
|
- !ruby/object:Gem::Version
|
132
|
-
version: '
|
207
|
+
version: '2.6'
|
133
208
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
209
|
requirements:
|
135
210
|
- - ">="
|
136
211
|
- !ruby/object:Gem::Version
|
137
212
|
version: '0'
|
138
213
|
requirements: []
|
139
|
-
|
140
|
-
rubygems_version: 2.0.14.1
|
214
|
+
rubygems_version: 3.0.3.1
|
141
215
|
signing_key:
|
142
216
|
specification_version: 4
|
143
217
|
summary: A Test Kitchen Driver to use Linodes as your development environment
|
144
218
|
test_files:
|
145
219
|
- spec/kitchen/driver/linode_spec.rb
|
220
|
+
- spec/mocks/create.txt
|
221
|
+
- spec/mocks/create_bad.txt
|
222
|
+
- spec/mocks/create_ratelimit.txt
|
223
|
+
- spec/mocks/create_timeout.txt
|
224
|
+
- spec/mocks/delete.txt
|
225
|
+
- spec/mocks/list.txt
|
226
|
+
- spec/mocks/view.txt
|
146
227
|
- spec/spec_helper.rb
|
data/.tailor
DELETED