kitchen-docker 3.2.4 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.release-please-manifest.json +1 -1
  4. data/.rubocop.yml +0 -1
  5. data/.yardopts +11 -0
  6. data/CHANGELOG.md +385 -18
  7. data/CONTRIBUTING.md +203 -0
  8. data/Gemfile +5 -3
  9. data/README.md +418 -519
  10. data/Rakefile +18 -0
  11. data/kitchen-docker.gemspec +3 -2
  12. data/lib/kitchen/docker/container/linux.rb +50 -0
  13. data/lib/kitchen/docker/container/windows.rb +27 -0
  14. data/lib/kitchen/docker/container.rb +34 -0
  15. data/lib/kitchen/docker/docker_version.rb +4 -2
  16. data/lib/kitchen/docker/erb_context.rb +9 -0
  17. data/lib/kitchen/docker/helpers/cli_helper.rb +56 -3
  18. data/lib/kitchen/docker/helpers/container_helper.rb +91 -19
  19. data/lib/kitchen/docker/helpers/dockerfile_helper.rb +54 -0
  20. data/lib/kitchen/docker/helpers/file_helper.rb +8 -0
  21. data/lib/kitchen/docker/helpers/image_helper.rb +28 -0
  22. data/lib/kitchen/docker/helpers/inspec_helper.rb +1 -0
  23. data/lib/kitchen/driver/docker.rb +27 -0
  24. data/lib/kitchen/transport/docker.rb +92 -2
  25. data/spec/cli_helper_spec.rb +312 -0
  26. data/spec/container_helper_spec.rb +178 -0
  27. data/spec/dockerfile_helper_spec.rb +97 -61
  28. data/spec/erb_context_spec.rb +60 -0
  29. data/spec/image_helper_spec.rb +142 -0
  30. data/spec/inspec_helper_spec.rb +14 -11
  31. data/spec/linux_container_spec.rb +194 -0
  32. data/spec/spec_helper.rb +28 -1
  33. data/spec/support/argv.rb +55 -0
  34. data/spec/support/docker_output.rb +117 -0
  35. data/spec/support/harness.rb +70 -0
  36. data/spec/transport_docker_spec.rb +130 -0
  37. data/spec/windows_container_spec.rb +101 -0
  38. metadata +16 -7
  39. data/test/integration/capabilities/disabled/capabilities_drop_spec.rb +0 -24
  40. data/test/integration/default/disabled/default_spec.rb +0 -24
  41. data/test/integration/default/disabled/spec_helper.rb +0 -21
@@ -0,0 +1,55 @@
1
+ #
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ #
8
+ # Unless required by applicable law or agreed to in writing, software
9
+ # distributed under the License is distributed on an "AS IS" BASIS,
10
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ # See the License for the specific language governing permissions and
12
+ # limitations under the License.
13
+ #
14
+
15
+ require "shellwords"
16
+
17
+ # Helpers for asserting on generated command lines.
18
+ #
19
+ # The driver builds `docker` invocations as single strings and hands them to a
20
+ # shell. Asserting on those strings with `include` is misleading: the string
21
+ # "-v /my volume:/data" contains "-v /my volume:/data", but the shell will tear
22
+ # it into three arguments and Docker will reject it. Splitting the command the
23
+ # way a shell would, and asserting on the resulting argument vector, is the only
24
+ # way for a test to see what Docker will actually receive.
25
+ module ArgvHelpers
26
+ # Splits a generated command line the way a shell would.
27
+ #
28
+ # @param command [String] the command line the driver built
29
+ # @return [Array<String>] the arguments Docker will actually receive
30
+ def argv(command)
31
+ Shellwords.split(command)
32
+ end
33
+ end
34
+
35
+ # Asserts that a flag and its value survive shell splitting as one argument
36
+ # each, and remain adjacent.
37
+ #
38
+ # `include` alone cannot express this: an argv of ["-v", "/my", "volume:/data"]
39
+ # includes "-v", and includes "/my", and would satisfy a naive assertion while
40
+ # being completely broken.
41
+ RSpec::Matchers.define :include_consecutive do |*expected|
42
+ match do |actual|
43
+ actual.each_cons(expected.length).any? { |window| window == expected }
44
+ end
45
+
46
+ failure_message do |actual|
47
+ "expected the argument vector to contain #{expected.inspect} as consecutive arguments\n" \
48
+ " got: #{actual.inspect}"
49
+ end
50
+
51
+ failure_message_when_negated do |actual|
52
+ "expected the argument vector not to contain #{expected.inspect} as consecutive arguments\n" \
53
+ " got: #{actual.inspect}"
54
+ end
55
+ end
@@ -0,0 +1,117 @@
1
+ #
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ #
8
+ # Unless required by applicable law or agreed to in writing, software
9
+ # distributed under the License is distributed on an "AS IS" BASIS,
10
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ # See the License for the specific language governing permissions and
12
+ # limitations under the License.
13
+ #
14
+
15
+ # Output captured from real `docker` invocations.
16
+ #
17
+ # The driver's parsers are the part of this gem most exposed to change outside
18
+ # it: Docker has rewritten its build output at least three times, and each
19
+ # rewrite has broken image-id parsing. Inventing plausible-looking output tests
20
+ # nothing, because a parser written against an invented format will happily
21
+ # agree with it. These strings are copied from actual runs, and the version that
22
+ # produced each one is recorded, so the suite says what it is compatible with.
23
+ module DockerOutput
24
+ # `docker build` on Docker 29.7.2 with BuildKit and BUILDKIT_PROGRESS=plain,
25
+ # which is how ImageHelper#build_image invokes it.
26
+ #
27
+ # Note there is no "writing image" line: BuildKit stopped emitting one, and
28
+ # the id now appears only in the "naming to moby-dangling@" line.
29
+ BUILD_29_7_BUILDKIT = <<~OUTPUT.freeze
30
+ #1 [internal] load build definition from Dockerfile-kitchen
31
+ #1 transferring dockerfile: 92B done
32
+ #1 DONE 0.0s
33
+
34
+ #2 [internal] load metadata for docker.io/library/alpine:3.20
35
+ #2 DONE 0.0s
36
+
37
+ #5 [1/2] FROM docker.io/library/alpine:3.20@sha256:d9e853e87e55526f6b2917df91a2115c36dd7c696a35be12163d44e6e2a4b6bc
38
+ #5 resolve docker.io/library/alpine:3.20@sha256:d9e853e87e55526f6b2917df91a2115c36dd7c696a35be12163d44e6e2a4b6bc done
39
+ #5 DONE 0.3s
40
+
41
+ #6 [2/2] RUN echo hello
42
+ #6 0.085 hello
43
+ #6 DONE 0.1s
44
+
45
+ #6 exporting to image
46
+ #6 exporting layers 0.0s done
47
+ #6 exporting manifest sha256:11bf8269eec601a760f884a563cf714dd02eacc5f1e6cd598cc49c3a031dab0f done
48
+ #6 exporting config sha256:30ca0fb0b01c490a57ae08f426919a7ca3f69737085b28d47847427dbce4e7c2 done
49
+ #6 exporting attestation manifest sha256:530b259bbff0d8c05488739e6fff58a482596104bd8ca6bdb640f1687fe7e6bf done
50
+ #6 exporting manifest list sha256:aba3aa20a98ea7578c1b41b4e5b17c71e64d1b7eccd5a4242d3f3956c327d8d4 done
51
+ #6 naming to moby-dangling@sha256:aba3aa20a98ea7578c1b41b4e5b17c71e64d1b7eccd5a4242d3f3956c327d8d4 done
52
+ #6 unpacking to moby-dangling@sha256:aba3aa20a98ea7578c1b41b4e5b17c71e64d1b7eccd5a4242d3f3956c327d8d4 done
53
+ #6 DONE 0.0s
54
+ OUTPUT
55
+
56
+ # The image id in BUILD_29_7_BUILDKIT. Verified runnable: `docker run` accepts
57
+ # it, so this really is the id the driver should carry into `state[:image_id]`.
58
+ BUILD_29_7_IMAGE_ID = "sha256:aba3aa20a98ea7578c1b41b4e5b17c71e64d1b7eccd5a4242d3f3956c327d8d4".freeze
59
+
60
+ # BuildKit as it emitted the id before the "naming to moby-dangling" form.
61
+ BUILD_BUILDKIT_WRITING_IMAGE = <<~OUTPUT.freeze
62
+ #8 exporting to image
63
+ #8 exporting layers 0.4s done
64
+ #8 writing image sha256:9d3a1b2c4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f9 0.0s done
65
+ #8 naming to docker.io/library/kitchen-docker done
66
+ #8 DONE 0.5s
67
+ OUTPUT
68
+
69
+ BUILD_BUILDKIT_WRITING_IMAGE_ID =
70
+ "sha256:9d3a1b2c4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f9".freeze
71
+
72
+ # The pre-BuildKit builder, still reachable with DOCKER_BUILDKIT=0.
73
+ BUILD_LEGACY = <<~OUTPUT.freeze
74
+ Step 3/3 : RUN echo hello
75
+ ---> Running in 4f2c1a9b8e7d
76
+ hello
77
+ Removing intermediate container 4f2c1a9b8e7d
78
+ ---> 1a2b3c4d5e6f
79
+ Successfully built 1a2b3c4d5e6f
80
+ OUTPUT
81
+
82
+ BUILD_LEGACY_IMAGE_ID = "1a2b3c4d5e6f".freeze
83
+
84
+ # `docker run -d`, the ordinary case: the id and nothing else.
85
+ RUN_CONTAINER_ID = "b89e1e8b07664a1ee0bd09decb833146eaf9cc810a152950e3576a56745944db".freeze
86
+ RUN_CLEAN = "#{RUN_CONTAINER_ID}\n".freeze
87
+
88
+ # `docker run -d` when the image is not cached locally. Every line after the
89
+ # id went to stderr, and CliHelper#run_command returns stdout + stderr, so
90
+ # this whole string is what the container-id parser is handed.
91
+ #
92
+ # Captured from Docker 29.7.2.
93
+ RUN_WITH_PULL_ON_STDERR = <<~OUTPUT.freeze
94
+ #{RUN_CONTAINER_ID}
95
+ Unable to find image 'alpine:3.20' locally
96
+ 3.20: Pulling from library/alpine
97
+ 25f1d6b1951a: Pulling fs layer
98
+ 25f1d6b1951a: Pull complete
99
+ Digest: sha256:d9e853e87e55526f6b2917df91a2115c36dd7c696a35be12163d44e6e2a4b6bc
100
+ Status: Downloaded newer image for alpine:3.20
101
+ OUTPUT
102
+
103
+ # The warning Docker emits on `run` on hosts whose kernel lacks swap
104
+ # accounting -- the default on Ubuntu. It goes to stderr, so it too is
105
+ # concatenated onto the container id.
106
+ RUN_WITH_SWAP_WARNING = "#{RUN_CONTAINER_ID}\nWARNING: No swap limit support\n".freeze
107
+
108
+ # `docker port <container> 22/tcp` on a dual-stack daemon. Docker 29.7.2.
109
+ PORT_DUAL_STACK = "0.0.0.0:52239\n[::]:52239\n".freeze
110
+
111
+ # The same, on a daemon publishing only on IPv6.
112
+ PORT_IPV6_ONLY = "[::]:52239\n".freeze
113
+
114
+ PORT_IPV4_ONLY = "0.0.0.0:52239\n".freeze
115
+
116
+ PUBLISHED_PORT = 52_239
117
+ end
@@ -0,0 +1,70 @@
1
+ #
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ #
8
+ # Unless required by applicable law or agreed to in writing, software
9
+ # distributed under the License is distributed on an "AS IS" BASIS,
10
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ # See the License for the specific language governing permissions and
12
+ # limitations under the License.
13
+ #
14
+
15
+ # Builds throwaway objects that mix in the driver's helper modules.
16
+ #
17
+ # The helpers are modules meant to be mixed into the driver, the transport, and
18
+ # the container classes. Testing them through one of those means dragging in a
19
+ # Test Kitchen instance, a platform, and a logger to exercise what is really
20
+ # just string building -- so mix them into a bare object with a config hash
21
+ # instead, which is what they actually depend on.
22
+ module HelperHarness
23
+ # Every helper module, which is what the driver itself mixes in.
24
+ ALL_HELPERS = [
25
+ Kitchen::Docker::Helpers::CliHelper,
26
+ Kitchen::Docker::Helpers::ContainerHelper,
27
+ Kitchen::Docker::Helpers::DockerfileHelper,
28
+ Kitchen::Docker::Helpers::ImageHelper,
29
+ Kitchen::Docker::Helpers::FileHelper,
30
+ ].freeze
31
+
32
+ # Takes its configuration positionally rather than as keywords, so that
33
+ # `helper(build_context: true)` cannot be mistaken for a keyword argument.
34
+ #
35
+ # @param config [Hash] driver configuration the helpers will read
36
+ # @return [Object] an object responding to every helper method
37
+ def helper(config = {})
38
+ klass = Class.new do
39
+ attr_accessor :config
40
+
41
+ def initialize(config)
42
+ @config = config
43
+ end
44
+
45
+ # Methods defined in the class body win over included modules regardless
46
+ # of include order, so these override anything the helpers bring in.
47
+ def logger
48
+ Kitchen.logger
49
+ end
50
+
51
+ # Kitchen::Logging's levels, silenced -- the helpers log freely and the
52
+ # output is noise in a test run.
53
+ %i{debug info warn error fatal}.each do |level|
54
+ define_method(level) { |*| nil }
55
+ end
56
+ end
57
+
58
+ ALL_HELPERS.each { |mod| klass.include(mod) }
59
+ klass.new(default_config.merge(config))
60
+ end
61
+
62
+ # Config the helpers read on nearly every path. Individual examples override
63
+ # what they care about, so each example states only what it is testing.
64
+ def default_config
65
+ {
66
+ binary: "docker",
67
+ socket: "unix:///var/run/docker.sock",
68
+ }
69
+ end
70
+ end
@@ -0,0 +1,130 @@
1
+ #
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ #
8
+ # Unless required by applicable law or agreed to in writing, software
9
+ # distributed under the License is distributed on an "AS IS" BASIS,
10
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ # See the License for the specific language governing permissions and
12
+ # limitations under the License.
13
+ #
14
+
15
+ require "spec_helper"
16
+ require "kitchen/transport/docker"
17
+
18
+ describe Kitchen::Transport::Docker::Connection do
19
+ let(:options) do
20
+ {
21
+ binary: "docker",
22
+ container_id: "abc123",
23
+ platform: "ubuntu-24.04",
24
+ socket: "unix:///var/run/docker.sock",
25
+ username: "kitchen",
26
+ }
27
+ end
28
+
29
+ subject(:connection) { described_class.new(options) }
30
+
31
+ # The class is declared inside `class Docker < Kitchen::Transport::Base`, so
32
+ # its superclass is reached through Ruby's ancestor constant lookup rather
33
+ # than being spelled out. Pin it, so the inheritance cannot drift.
34
+ it "inherits from the Test Kitchen base connection" do
35
+ expect(described_class.superclass).to be Kitchen::Transport::Base::Connection
36
+ end
37
+
38
+ describe "#login_command" do
39
+ subject(:login_command) { connection.login_command }
40
+
41
+ it "returns a Kitchen::LoginCommand" do
42
+ expect(login_command).to be_a(Kitchen::LoginCommand)
43
+ end
44
+
45
+ it "execs the docker binary" do
46
+ expect(login_command.command).to eq "docker"
47
+ end
48
+
49
+ it "opens an interactive login shell on a Linux container" do
50
+ expect(login_command.arguments).to eq %w{
51
+ -H unix:///var/run/docker.sock
52
+ exec -t -i -u kitchen abc123 /bin/bash --login -i
53
+ }
54
+ end
55
+
56
+ it "passes each flag and its value as separate argv tokens" do
57
+ expect(login_command.arguments).to include("-H", "unix:///var/run/docker.sock")
58
+ expect(login_command.arguments).not_to include("-H unix:///var/run/docker.sock")
59
+ end
60
+
61
+ context "on a Windows container" do
62
+ let(:options) do
63
+ {
64
+ binary: "docker",
65
+ container_id: "abc123",
66
+ platform: "windows-2022",
67
+ socket: "tcp://localhost:2375",
68
+ username: nil,
69
+ }
70
+ end
71
+
72
+ it "opens a PowerShell session instead of bash" do
73
+ expect(login_command.arguments).to eq %w{
74
+ -H tcp://localhost:2375
75
+ exec -t -i abc123 powershell
76
+ }
77
+ end
78
+ end
79
+
80
+ context "with TLS configured" do
81
+ before do
82
+ options.merge!(
83
+ tls: true,
84
+ tls_verify: true,
85
+ tls_cacert: "/certs/ca.pem",
86
+ tls_cert: "/certs/cert.pem",
87
+ tls_key: "/certs/key.pem"
88
+ )
89
+ end
90
+
91
+ it "includes the TLS flags before the exec subcommand" do
92
+ expect(login_command.arguments.take(8)).to eq %w{
93
+ -H unix:///var/run/docker.sock
94
+ --tls --tlsverify
95
+ --tlscacert=/certs/ca.pem
96
+ --tlscert=/certs/cert.pem
97
+ --tlskey=/certs/key.pem
98
+ exec
99
+ }
100
+ end
101
+ end
102
+
103
+ context "with a working directory and environment variables" do
104
+ before do
105
+ options.merge!(working_dir: "/opt/kitchen", env_variables: { FOO: "bar" })
106
+ end
107
+
108
+ it "passes them through to docker exec" do
109
+ expect(login_command.arguments).to include("-w", "/opt/kitchen")
110
+ expect(login_command.arguments).to include("-e", "FOO=bar")
111
+ end
112
+ end
113
+
114
+ context "when the transport is configured to detach" do
115
+ before { options.merge!(detach: true) }
116
+
117
+ it "still runs attached so the session is usable" do
118
+ expect(login_command.arguments).not_to include("-d")
119
+ end
120
+ end
121
+
122
+ context "when the transport is configured as privileged" do
123
+ before { options.merge!(privileged: true) }
124
+
125
+ it "keeps the privileged flag" do
126
+ expect(login_command.arguments).to include("--privileged")
127
+ end
128
+ end
129
+ end
130
+ end
@@ -0,0 +1,101 @@
1
+ #
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ #
8
+ # Unless required by applicable law or agreed to in writing, software
9
+ # distributed under the License is distributed on an "AS IS" BASIS,
10
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ # See the License for the specific language governing permissions and
12
+ # limitations under the License.
13
+ #
14
+
15
+ require "spec_helper"
16
+ require "tmpdir"
17
+
18
+ describe Kitchen::Docker::Container::Windows do
19
+ def container(config = {})
20
+ described_class.new({
21
+ image: "mcr.microsoft.com/windows/servercore:ltsc2022",
22
+ platform: "windows",
23
+ username: "administrator",
24
+ }.merge(config))
25
+ end
26
+
27
+ describe "#dockerfile" do
28
+ subject(:dockerfile) { container.send(:dockerfile) }
29
+
30
+ it "starts from the configured image" do
31
+ expect(dockerfile.lines.first.strip).to eq "FROM mcr.microsoft.com/windows/servercore:ltsc2022"
32
+ end
33
+
34
+ it "installs no SSH server" do
35
+ # Windows containers are driven entirely through `docker exec`. Emitting
36
+ # the Linux SSH setup here would fail the build on the first RUN.
37
+ expect(dockerfile).not_to match(/openssh|authorized_keys|sshd/)
38
+ end
39
+
40
+ it "appends each provision_command as its own RUN line" do
41
+ expect(container(provision_command: ["powershell -Command a", "powershell -Command b"]).send(:dockerfile))
42
+ .to include("RUN powershell -Command a\n").and include("RUN powershell -Command b\n")
43
+ end
44
+
45
+ it "carries the proxy configuration into the image" do
46
+ expect(container(http_proxy: "http://proxy:8080").send(:dockerfile))
47
+ .to include "ENV http_proxy=http://proxy:8080"
48
+ end
49
+
50
+ it "refuses to build for a non-Windows platform" do
51
+ # Reaching here with platform: ubuntu means the driver picked the wrong
52
+ # container class, and the resulting image would be silently wrong.
53
+ expect { container(platform: "ubuntu").send(:dockerfile) }
54
+ .to raise_error(Kitchen::ActionFailed, /Unknown platform 'ubuntu'/)
55
+ end
56
+
57
+ it "uses a custom dockerfile verbatim when configured" do
58
+ Dir.mktmpdir do |dir|
59
+ path = File.join(dir, "Dockerfile")
60
+ File.write(path, "FROM <%= @image %>\n")
61
+ expect(container(dockerfile: path).send(:dockerfile))
62
+ .to eq "FROM mcr.microsoft.com/windows/servercore:ltsc2022\n"
63
+ end
64
+ end
65
+ end
66
+
67
+ describe "the contract it shares with the Linux container" do
68
+ # The two classes share almost no code but must agree on the state they
69
+ # populate, because the driver and transport read the same keys whichever
70
+ # one ran. A key added on one side and forgotten on the other shows up as a
71
+ # nil far away from the cause.
72
+ it "publishes no port, because there is no SSH server to reach" do
73
+ c = container
74
+ allow(c).to receive(:build_image).and_return("sha256:abc")
75
+ allow(c).to receive(:container_exists?).and_return(false)
76
+ allow(c).to receive(:hostname).and_return("localhost")
77
+ expect(c).to receive(:run_container).with(anything).and_return("abc123")
78
+
79
+ state = {}
80
+ c.create(state)
81
+ expect(state).not_to have_key(:port)
82
+ end
83
+
84
+ it "records the container id, image id, hostname, and username" do
85
+ c = container
86
+ allow(c).to receive(:build_image).and_return("sha256:abc")
87
+ allow(c).to receive(:container_exists?).and_return(false)
88
+ allow(c).to receive(:run_container).and_return("abc123")
89
+ allow(c).to receive(:hostname).and_return("localhost")
90
+
91
+ state = {}
92
+ c.create(state)
93
+ expect(state).to include(
94
+ image_id: "sha256:abc",
95
+ container_id: "abc123",
96
+ hostname: "localhost",
97
+ username: "administrator"
98
+ )
99
+ end
100
+ end
101
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.4
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Porter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-07-28 00:00:00.000000000 Z
11
+ date: 2026-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen
@@ -45,7 +45,9 @@ files:
45
45
  - ".release-please-manifest.json"
46
46
  - ".rubocop.yml"
47
47
  - ".yamllint"
48
+ - ".yardopts"
48
49
  - CHANGELOG.md
50
+ - CONTRIBUTING.md
49
51
  - Gemfile
50
52
  - LICENSE
51
53
  - README.md
@@ -70,24 +72,31 @@ files:
70
72
  - lib/kitchen/transport/docker.rb
71
73
  - release-please-config.json
72
74
  - renovate.json
75
+ - spec/cli_helper_spec.rb
76
+ - spec/container_helper_spec.rb
73
77
  - spec/docker_spec.rb
74
78
  - spec/dockerfile_helper_spec.rb
79
+ - spec/erb_context_spec.rb
80
+ - spec/image_helper_spec.rb
75
81
  - spec/inspec_helper_spec.rb
82
+ - spec/linux_container_spec.rb
76
83
  - spec/spec_helper.rb
84
+ - spec/support/argv.rb
85
+ - spec/support/docker_output.rb
86
+ - spec/support/harness.rb
87
+ - spec/transport_docker_spec.rb
88
+ - spec/windows_container_spec.rb
77
89
  - test/Dockerfile
78
90
  - test/cookbooks/cinc_test/metadata.rb
79
91
  - test/cookbooks/cinc_test/recipes/default.rb
80
92
  - test/cookbooks/docker_test/attributes/default.rb
81
93
  - test/cookbooks/docker_test/metadata.rb
82
94
  - test/cookbooks/docker_test/recipes/default.rb
83
- - test/integration/capabilities/disabled/capabilities_drop_spec.rb
84
95
  - test/integration/cinc/inspec/cinc_spec.rb
85
- - test/integration/default/disabled/default_spec.rb
86
- - test/integration/default/disabled/spec_helper.rb
87
96
  - test/integration/inspec/inspec_spec.rb
88
97
  homepage: https://github.com/test-kitchen/kitchen-docker
89
98
  licenses:
90
- - Apache 2.0
99
+ - Apache-2.0
91
100
  metadata: {}
92
101
  post_install_message:
93
102
  rdoc_options: []
@@ -97,7 +106,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
97
106
  requirements:
98
107
  - - ">="
99
108
  - !ruby/object:Gem::Version
100
- version: '0'
109
+ version: '3.1'
101
110
  required_rubygems_version: !ruby/object:Gem::Requirement
102
111
  requirements:
103
112
  - - ">="
@@ -1,24 +0,0 @@
1
- #
2
- # Copyright 2016, Noah Kantrowitz
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- #
16
-
17
- # Disable now busser-serever is gone.
18
- # require 'serverspec'
19
- # set :backend, :exec
20
-
21
- # describe command('/sbin/ifconfig eth0 multicast') do
22
- # its(:exit_status) { is_expected.to_not eq 0 }
23
- # its(:stderr) { is_expected.to match /Operation not permitted/ }
24
- # end
@@ -1,24 +0,0 @@
1
- #
2
- # Copyright 2016, Noah Kantrowitz
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- #
16
-
17
- # Disable now busser-server is gone.
18
- # require "serverspec"
19
- # require "spec_helper"
20
- #
21
- # Just make sure the image launched and is reachable.
22
- # describe command("true") do
23
- # its(:exit_status) { is_expected.to eq 0 }
24
- # end
@@ -1,21 +0,0 @@
1
- #
2
- # Licensed under the Apache License, Version 2.0 (the "License");
3
- # you may not use this file except in compliance with the License.
4
- # You may obtain a copy of the License at
5
- #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
- #
8
- # Unless required by applicable law or agreed to in writing, software
9
- # distributed under the License is distributed on an "AS IS" BASIS,
10
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- # See the License for the specific language governing permissions and
12
- # limitations under the License.
13
- #
14
-
15
- # case RbConfig::CONFIG['host_os']
16
- # when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
17
- # set :backend, :cmd
18
- # set :os, :family => 'windows'
19
- # else
20
- # set :backend, :exec
21
- # end