beaker-docker 0.3.2 → 0.3.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
  SHA1:
3
- metadata.gz: 67087e4a344e2b99b38c11d92dc6e1ec6d0da906
4
- data.tar.gz: 590abd5e22e21b77974f7ec68c53580d12a95e92
3
+ metadata.gz: 6209552fba9be50c92f1ab41f05168aba9496fb1
4
+ data.tar.gz: 7005bd577927536fd0310fafae5019ec0e1934e1
5
5
  SHA512:
6
- metadata.gz: 6d7a7cb7428dd46aaf452fd91a84ed1195852ad49976f701d04b36ad740b1e1c0f38fdd3f4d1cc473ef80af3bff8a14cf0f49ac53562d8bbcb0de4527a2c482e
7
- data.tar.gz: fd4b769202763ccd5da58cd0620284d481a894fed70e2ac3663b4e6a007885d3c6b7bfa0e388dbb4ab393091d0e25019a4d4058e8c116efe7f46b472d0106b49
6
+ metadata.gz: 4d8ae66a90bcec770102ec58df4a2ab813e0876af97dce42f296e45b0dc07612830b7d0edb00de1b8d57d734e99b758296603bb01986e494d79fdcd19e4318d6
7
+ data.tar.gz: bc0a408820e03f065f4723fcae75103abf3fdb305225f247754d591c0538366dd685b007cda74d85d8df321f6c629e2934990ea1850accf89551c6c6d3670e5d
@@ -12,6 +12,10 @@ HOSTS:
12
12
  - classifier
13
13
  - default
14
14
  docker_cmd: '["/sbin/init"]'
15
+ dockeropts:
16
+ Labels:
17
+ one: '1'
18
+ two: '2'
15
19
  ubuntu1604-64-2:
16
20
  platform: ubuntu-1604-x86_64
17
21
  hypervisor: docker
@@ -23,3 +27,7 @@ CONFIG:
23
27
  nfs_server: none
24
28
  consoleport: 443
25
29
  log_level: verbose
30
+ dockeropts:
31
+ Labels:
32
+ one: '3'
33
+ two: '4'
@@ -1,3 +1,3 @@
1
1
  module BeakerDocker
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
@@ -81,6 +81,12 @@ module Beaker
81
81
  }
82
82
  }
83
83
  }
84
+ if host['dockeropts'] || @options[:dockeropts]
85
+ dockeropts = host['dockeropts'] ? host['dockeropts'] : @options[:dockeropts]
86
+ dockeropts.each do |k,v|
87
+ container_opts[k] = v
88
+ end
89
+ end
84
90
  container = find_container(host)
85
91
 
86
92
  # If the specified container exists, then use it rather creating a new one
@@ -20,7 +20,16 @@ module Beaker
20
20
  ]
21
21
 
22
22
  describe Docker do
23
- let(:hosts) { make_hosts }
23
+ let(:hosts) {
24
+ the_hosts = make_hosts
25
+ the_hosts[2]['dockeropts'] = {
26
+ 'Labels' => {
27
+ 'one' => 3,
28
+ 'two' => 4,
29
+ },
30
+ }
31
+ the_hosts
32
+ }
24
33
 
25
34
  let(:logger) do
26
35
  logger = double('logger')
@@ -35,7 +44,13 @@ module Beaker
35
44
  let(:options) {{
36
45
  :logger => logger,
37
46
  :forward_ssh_agent => true,
38
- :provision => true
47
+ :provision => true,
48
+ :dockeropts => {
49
+ 'Labels' => {
50
+ 'one' => 1,
51
+ 'two' => 2,
52
+ },
53
+ },
39
54
  }}
40
55
 
41
56
  let(:image) do
@@ -65,7 +80,7 @@ module Beaker
65
80
  ],
66
81
  },
67
82
  'Gateway' => '192.0.2.254'
68
- },
83
+ }
69
84
  })
70
85
  allow( container ).to receive(:kill)
71
86
  allow( container ).to receive(:delete)
@@ -191,7 +206,11 @@ module Beaker
191
206
  'RestartPolicy' => {
192
207
  'Name' => 'always'
193
208
  }
194
- }
209
+ },
210
+ 'Labels' => {
211
+ 'one' => 1,
212
+ 'two' => 2,
213
+ },
195
214
  }).with(hash_excluding('name'))
196
215
  end
197
216
 
@@ -220,7 +239,11 @@ module Beaker
220
239
  'RestartPolicy' => {
221
240
  'Name' => 'always'
222
241
  }
223
- }
242
+ },
243
+ 'Labels' => {
244
+ 'one' => 1,
245
+ 'two' => 2,
246
+ },
224
247
  }).with(hash_excluding('name'))
225
248
  end
226
249
 
@@ -245,7 +268,11 @@ module Beaker
245
268
  'RestartPolicy' => {
246
269
  'Name' => 'always'
247
270
  }
248
- }
271
+ },
272
+ 'Labels' => {
273
+ 'one' => (index == 2 ? 3 : 1),
274
+ 'two' => (index == 2 ? 4 : 2),
275
+ },
249
276
  })
250
277
  end
251
278
 
@@ -299,7 +326,11 @@ module Beaker
299
326
  'RestartPolicy' => {
300
327
  'Name' => 'always'
301
328
  }
302
- }
329
+ },
330
+ 'Labels' => {
331
+ 'one' => (index == 2 ? 3 : 1),
332
+ 'two' => (index == 2 ? 4 : 2),
333
+ },
303
334
  })
304
335
  end
305
336
 
@@ -323,7 +354,11 @@ module Beaker
323
354
  'Name' => 'always'
324
355
  },
325
356
  'CapAdd' => ['NET_ADMIN', 'SYS_ADMIN']
326
- }
357
+ },
358
+ 'Labels' => {
359
+ 'one' => (index == 2 ? 3 : 1),
360
+ 'two' => (index == 2 ? 4 : 2),
361
+ },
327
362
  })
328
363
  end
329
364
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rishi Javia, Kevin Imber, Tony Vu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-09 00:00:00.000000000 Z
11
+ date: 2018-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec