beaker-docker 2.2.0 → 2.3.0
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.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +2 -2
- data/.github/workflows/test.yml +7 -6
- data/CHANGELOG.md +21 -0
- data/beaker-docker.gemspec +2 -2
- data/lib/beaker/hypervisor/docker.rb +3 -3
- data/lib/beaker-docker/version.rb +1 -1
- data/spec/beaker/hypervisor/docker_spec.rb +35 -47
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fce85bc2b4afe7e30f0f4360bf85bbc326bb402dd2296171010fa5746e7afe6d
|
4
|
+
data.tar.gz: 4d18a84114b99e7a1a1ee2aaff38456c20042c36bc67650310cfd4e70b467a76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eccead0c6aede25aeacfecafe6a907f3677827e45330a5045b0d503be7cd8abc5b5b35b6769fdad53c534c09cdc5a67491d4bbd27f46c2662f699152008ff535
|
7
|
+
data.tar.gz: e6c12d6f1b4b817b1f05066cd50db6a5b40be1b523c0b289d08ea8491cca9ded1f35d11e510a4b5533a2c07c173300d55302bd3b13edfa407bed86aac886a8a1
|
@@ -11,10 +11,10 @@ jobs:
|
|
11
11
|
if: github.repository_owner == 'voxpupuli'
|
12
12
|
steps:
|
13
13
|
- uses: actions/checkout@v4
|
14
|
-
- name: Install Ruby 3.
|
14
|
+
- name: Install Ruby 3.3
|
15
15
|
uses: ruby/setup-ruby@v1
|
16
16
|
with:
|
17
|
-
ruby-version: '3.
|
17
|
+
ruby-version: '3.3'
|
18
18
|
env:
|
19
19
|
BUNDLE_WITHOUT: release
|
20
20
|
- name: Build gem
|
data/.github/workflows/test.yml
CHANGED
@@ -14,10 +14,10 @@ jobs:
|
|
14
14
|
runs-on: ubuntu-latest
|
15
15
|
steps:
|
16
16
|
- uses: actions/checkout@v4
|
17
|
-
- name: Install Ruby 3.
|
17
|
+
- name: Install Ruby 3.3
|
18
18
|
uses: ruby/setup-ruby@v1
|
19
19
|
with:
|
20
|
-
ruby-version: "3.
|
20
|
+
ruby-version: "3.3"
|
21
21
|
bundler-cache: true
|
22
22
|
- name: Run Rubocop
|
23
23
|
run: bundle exec rake rubocop
|
@@ -33,6 +33,7 @@ jobs:
|
|
33
33
|
coverage: "yes"
|
34
34
|
- ruby: "3.1"
|
35
35
|
- ruby: "3.2"
|
36
|
+
- ruby: "3.3"
|
36
37
|
env:
|
37
38
|
COVERAGE: ${{ matrix.coverage }}
|
38
39
|
name: RSpec - Ruby ${{ matrix.ruby }}
|
@@ -53,10 +54,10 @@ jobs:
|
|
53
54
|
name: Docker
|
54
55
|
steps:
|
55
56
|
- uses: actions/checkout@v4
|
56
|
-
- name: Install Ruby 3.
|
57
|
+
- name: Install Ruby 3.3
|
57
58
|
uses: ruby/setup-ruby@v1
|
58
59
|
with:
|
59
|
-
ruby-version: "3.
|
60
|
+
ruby-version: "3.3"
|
60
61
|
bundler-cache: true
|
61
62
|
- name: Run acceptance tests
|
62
63
|
run: bundle exec rake test:acceptance
|
@@ -84,10 +85,10 @@ jobs:
|
|
84
85
|
name: Podman
|
85
86
|
steps:
|
86
87
|
- uses: actions/checkout@v4
|
87
|
-
- name: Install Ruby 3.
|
88
|
+
- name: Install Ruby 3.3
|
88
89
|
uses: ruby/setup-ruby@v1
|
89
90
|
with:
|
90
|
-
ruby-version: "3.
|
91
|
+
ruby-version: "3.3"
|
91
92
|
bundler-cache: true
|
92
93
|
- name: Run acceptance tests
|
93
94
|
run: bundle exec rake test:acceptance
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [2.3.0](https://github.com/voxpupuli/beaker-docker/tree/2.3.0) (2024-05-28)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/2.2.1...2.3.0)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- beaker: Allow 6.x [\#135](https://github.com/voxpupuli/beaker-docker/pull/135) ([bastelfreak](https://github.com/bastelfreak))
|
10
|
+
- Add Ruby 3.3 to CI matrix [\#134](https://github.com/voxpupuli/beaker-docker/pull/134) ([bastelfreak](https://github.com/bastelfreak))
|
11
|
+
|
12
|
+
**Merged pull requests:**
|
13
|
+
|
14
|
+
- voxpupuli-rubocop: Use 2.7.0 [\#136](https://github.com/voxpupuli/beaker-docker/pull/136) ([bastelfreak](https://github.com/bastelfreak))
|
15
|
+
|
16
|
+
## [2.2.1](https://github.com/voxpupuli/beaker-docker/tree/2.2.1) (2024-03-27)
|
17
|
+
|
18
|
+
[Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/2.2.0...2.2.1)
|
19
|
+
|
20
|
+
**Fixed bugs:**
|
21
|
+
|
22
|
+
- Fix privileged remote docker port forward resolution [\#126](https://github.com/voxpupuli/beaker-docker/pull/126) ([h0tw1r3](https://github.com/h0tw1r3))
|
23
|
+
|
3
24
|
## [2.2.0](https://github.com/voxpupuli/beaker-docker/tree/2.2.0) (2024-03-17)
|
4
25
|
|
5
26
|
[Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/2.1.0...2.2.0)
|
data/beaker-docker.gemspec
CHANGED
@@ -28,10 +28,10 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.add_development_dependency 'fakefs', '>= 1.3', '< 3.0'
|
29
29
|
s.add_development_dependency 'rake', '~> 13.0'
|
30
30
|
s.add_development_dependency 'rspec', '~> 3.0'
|
31
|
-
s.add_development_dependency 'voxpupuli-rubocop', '~> 2.
|
31
|
+
s.add_development_dependency 'voxpupuli-rubocop', '~> 2.7.0'
|
32
32
|
|
33
33
|
# Run time dependencies
|
34
|
-
s.add_runtime_dependency 'beaker', '>= 4', '<
|
34
|
+
s.add_runtime_dependency 'beaker', '>= 4', '< 7'
|
35
35
|
s.add_runtime_dependency 'docker-api', '~> 2.1'
|
36
36
|
s.add_runtime_dependency 'stringify-hash', '~> 0.0.0'
|
37
37
|
end
|
@@ -188,9 +188,9 @@ module Beaker
|
|
188
188
|
end
|
189
189
|
end
|
190
190
|
|
191
|
-
if host_config['NetworkMode'] != 'slirp4netns' && network_settings['IPAddress'] && !network_settings['IPAddress'].empty?
|
192
|
-
|
193
|
-
|
191
|
+
ip = network_settings['IPAddress'] if ip.nil? && host_config['NetworkMode'] != 'slirp4netns' && network_settings['IPAddress'] && !network_settings['IPAddress'].empty?
|
192
|
+
|
193
|
+
if port.nil?
|
194
194
|
port22 = network_settings.dig('Ports', '22/tcp')
|
195
195
|
port = port22[0]['HostPort'] if port22
|
196
196
|
end
|
@@ -110,6 +110,12 @@ module Beaker
|
|
110
110
|
|
111
111
|
before do
|
112
112
|
allow(::Docker).to receive(:rootless?).and_return(true)
|
113
|
+
@docker_host = ENV.fetch('DOCKER_HOST', nil)
|
114
|
+
ENV.delete('DOCKER_HOST') if @docker_host
|
115
|
+
end
|
116
|
+
|
117
|
+
after do
|
118
|
+
ENV['DOCKER_HOST'] = @docker_host if @docker_host
|
113
119
|
end
|
114
120
|
|
115
121
|
context 'with connection failure' do
|
@@ -476,64 +482,46 @@ module Beaker
|
|
476
482
|
end
|
477
483
|
|
478
484
|
context 'when connecting to ssh' do
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
it 'exposes port 22 to beaker' do
|
485
|
-
ENV['DOCKER_HOST'] = nil
|
486
|
-
docker.provision
|
487
|
-
|
488
|
-
expect(hosts[0]['ip']).to eq '127.0.0.1'
|
489
|
-
expect(hosts[0]['port']).to eq 8022
|
490
|
-
end
|
491
|
-
|
492
|
-
it 'exposes port 22 to beaker when using DOCKER_HOST' do
|
493
|
-
ENV['DOCKER_HOST'] = 'tcp://192.0.2.2:2375'
|
494
|
-
docker.provision
|
495
|
-
|
496
|
-
expect(hosts[0]['ip']).to eq '192.0.2.2'
|
497
|
-
expect(hosts[0]['port']).to eq 8022
|
498
|
-
end
|
485
|
+
%w[rootless privileged].each do |mode|
|
486
|
+
context "when #{mode}" do
|
487
|
+
let(:container_mode) do
|
488
|
+
mode
|
489
|
+
end
|
499
490
|
|
500
|
-
|
501
|
-
|
502
|
-
docker.provision
|
491
|
+
it 'exposes port 22 to beaker' do
|
492
|
+
docker.provision
|
503
493
|
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
expect(hosts[0]['ssh'][:port]).to eq 8022
|
508
|
-
expect(hosts[0]['ssh'][:forward_agent]).to be true
|
509
|
-
end
|
494
|
+
expect(hosts[0]['ip']).to eq '127.0.0.1'
|
495
|
+
expect(hosts[0]['port']).to eq 8022
|
496
|
+
end
|
510
497
|
|
511
|
-
|
512
|
-
|
513
|
-
FileUtils.touch('/.dockerenv')
|
498
|
+
it 'exposes port 22 to beaker when using DOCKER_HOST' do
|
499
|
+
ENV['DOCKER_HOST'] = 'tcp://192.0.2.2:2375'
|
514
500
|
docker.provision
|
515
501
|
|
516
|
-
expect(hosts[0]['ip']).to eq '192.0.2.
|
502
|
+
expect(hosts[0]['ip']).to eq '192.0.2.2'
|
517
503
|
expect(hosts[0]['port']).to eq 8022
|
518
504
|
end
|
519
|
-
end
|
520
|
-
end
|
521
|
-
|
522
|
-
context 'when rootful' do
|
523
|
-
before { @docker_host = ENV.fetch('DOCKER_HOST', nil) }
|
524
505
|
|
525
|
-
|
506
|
+
it 'has ssh agent forwarding enabled' do
|
507
|
+
docker.provision
|
526
508
|
|
527
|
-
|
528
|
-
|
529
|
-
|
509
|
+
expect(hosts[0]['ip']).to eq '127.0.0.1'
|
510
|
+
expect(hosts[0]['port']).to eq 8022
|
511
|
+
expect(hosts[0]['ssh'][:password]).to eq 'root'
|
512
|
+
expect(hosts[0]['ssh'][:port]).to eq 8022
|
513
|
+
expect(hosts[0]['ssh'][:forward_agent]).to be true
|
514
|
+
end
|
530
515
|
|
531
|
-
|
532
|
-
|
533
|
-
|
516
|
+
it 'connects to gateway ip' do
|
517
|
+
FakeFS do
|
518
|
+
FileUtils.touch('/.dockerenv')
|
519
|
+
docker.provision
|
534
520
|
|
535
|
-
|
536
|
-
|
521
|
+
expect(hosts[0]['ip']).to eq '192.0.2.254'
|
522
|
+
expect(hosts[0]['port']).to eq 8022
|
523
|
+
end
|
524
|
+
end
|
537
525
|
end
|
538
526
|
end
|
539
527
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker-docker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vox Pupuli
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2024-
|
14
|
+
date: 2024-05-28 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: fakefs
|
@@ -67,14 +67,14 @@ dependencies:
|
|
67
67
|
requirements:
|
68
68
|
- - "~>"
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 2.
|
70
|
+
version: 2.7.0
|
71
71
|
type: :development
|
72
72
|
prerelease: false
|
73
73
|
version_requirements: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
75
|
- - "~>"
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 2.
|
77
|
+
version: 2.7.0
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
name: beaker
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,7 +84,7 @@ dependencies:
|
|
84
84
|
version: '4'
|
85
85
|
- - "<"
|
86
86
|
- !ruby/object:Gem::Version
|
87
|
-
version: '
|
87
|
+
version: '7'
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
90
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -94,7 +94,7 @@ dependencies:
|
|
94
94
|
version: '4'
|
95
95
|
- - "<"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: '
|
97
|
+
version: '7'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: docker-api
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
176
|
- !ruby/object:Gem::Version
|
177
177
|
version: '0'
|
178
178
|
requirements: []
|
179
|
-
rubygems_version: 3.
|
179
|
+
rubygems_version: 3.5.9
|
180
180
|
signing_key:
|
181
181
|
specification_version: 4
|
182
182
|
summary: Docker hypervisor for Beaker acceptance testing framework
|