kitchen-docker_cli 0.6.0 → 0.7.0

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: c7483d1dbadf7606fd954e80bf8b819bcf44b663
4
- data.tar.gz: 0369d2399ac693f3526cfad5cd92c93542b8b93e
3
+ metadata.gz: 3fd86ce137d59b453b7c40eff81cabe41bb47406
4
+ data.tar.gz: 25505e03b00d59763d76bfea7317648b7d8ddc83
5
5
  SHA512:
6
- metadata.gz: 1bdc553437c67875343bea2405825be1394fc7687f11e1219575c44864ae849afb0524be1d9675ff1ef4daf6b82484823a64d5a58f93020b5de75d332890dfaa
7
- data.tar.gz: 93444fbd34ea23487d1e2245e706a953db86906258ffe2c9e15700aa6fe423e8dd379397b060d286c2982fee70410550ac50e2e092ebfb82baaa7712ab3001c7
6
+ metadata.gz: 107bb0912d3f96908cca31b230f1e99dcc1951110792b0235e6fdfa8d18023122e7c1e6004f42297800efc47003db43e32b1082010993479feafc8c739c1994c
7
+ data.tar.gz: 7bc23af137f9a17d39571c7a53bc1888b33f284d9e93e178c25ad346b8bb752ef27998aa5e4d2d41fb89cf9fb879c6111b187ea7fceb63bb98c59d27698fe01f
data/.kitchen.yml CHANGED
@@ -2,6 +2,9 @@
2
2
  driver:
3
3
  name: docker_cli
4
4
 
5
+ driver_config:
6
+ hostname: example.local
7
+
5
8
  platforms:
6
9
  - name: ubuntu-12.04
7
10
  - name: centos-6.4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.7.0
2
+
3
+ * Add `hostname` option
4
+
1
5
  ## 0.6.0
2
6
 
3
7
  * Pull request [#4][]: allow setup environment variables(add environment option) ([@hd-deman][])
data/README.md CHANGED
@@ -164,6 +164,16 @@ Examples:
164
164
  network: host
165
165
  ```
166
166
 
167
+ ### hostname
168
+
169
+ Set hostname to container.
170
+
171
+ Examples:
172
+
173
+ ```yml
174
+ hostname: example.local
175
+ ```
176
+
167
177
  ### link
168
178
 
169
179
  Set `container_name`(and alias) of other container(s) that connect from the suite container.
@@ -132,6 +132,7 @@ module Kitchen
132
132
  cmd << " -c #{config[:cpu_shares]}" if config[:cpu_shares]
133
133
  cmd << ' --privileged' if config[:privileged]
134
134
  cmd << " --net #{config[:network]}" if config[:network]
135
+ cmd << " -h #{config[:hostname]}" if config[:hostname]
135
136
  Array(config[:publish]).each { |pub| cmd << " -p #{pub}" }
136
137
  Array(config[:volume]).each { |vol| cmd << " -v #{vol}" }
137
138
  Array(config[:link]).each { |link| cmd << " --link #{link}" }
@@ -21,6 +21,6 @@ module Kitchen
21
21
  module Driver
22
22
 
23
23
  # Version string for DockerCli Kitchen driver
24
- DOCKER_CLI_VERSION = '0.6.0'
24
+ DOCKER_CLI_VERSION = '0.7.0'
25
25
  end
26
26
  end
@@ -241,12 +241,13 @@ describe Kitchen::Driver::DockerCli, "docker_run_command" do
241
241
  :link => 'mysql:db',
242
242
  :memory_limit => '256m',
243
243
  :cpu_shares => 512,
244
- :network => 'none'
244
+ :network => 'none',
245
+ :hostname => 'example.local'
245
246
  }
246
247
  end
247
248
 
248
249
  example do
249
- cmd = "run -d --name web -P -m 256m -c 512 --privileged --net none -p 80:8080 -p 22:2222 -v /dev:/dev --link mysql:db test /bin/bash"
250
+ cmd = "run -d --name web -P -m 256m -c 512 --privileged --net none -h example.local -p 80:8080 -p 22:2222 -v /dev:/dev --link mysql:db test /bin/bash"
250
251
  expect(@docker_cli.docker_run_command('test')).to eq cmd
251
252
  end
252
253
  end
@@ -6,3 +6,7 @@ set :path, '/sbin:/usr/local/sbin:$PATH'
6
6
  describe file('/tmp') do
7
7
  it { should be_directory }
8
8
  end
9
+
10
+ describe command('hostname') do
11
+ its(:stdout) { should match /example\.local/ }
12
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-docker_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masashi Terui
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-17 00:00:00.000000000 Z
11
+ date: 2015-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen