beaker-docker 3.1.0 → 3.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32bbe60ffa590b3dadc093f098b34513b036bb104f4f8017a9ad233127974a02
4
- data.tar.gz: 1ba3e290c1c18be4ae5d66baa5cbfd5d99b77b5d57213e50868b5bf940568793
3
+ metadata.gz: 20458b7863defa8965bb32ebf8509c39cb8879b6a3d77c738fe76c55ad80b7b0
4
+ data.tar.gz: de353c5f2b2a75edefed8e4926eeb07792717173db68cfa3081fa5e747920a17
5
5
  SHA512:
6
- metadata.gz: 8693d6608fa81f4c21e71ad011a2c50a427e7304a445cb19aeb7f9c54c817310f3e13ac1114d84ff8bdc3446ae7f255ca97d794ca0134d73013a8de94fdb5b01
7
- data.tar.gz: 0137e77889c7570d3338d7a24bafe0861ba37cb72b8944577ad6c4b7e1c0ec3d0487e679e203110d4ab9144e62187561f03a94f7cce91e22ef42cdd56b539c50
6
+ metadata.gz: b17e5c8962e810565652fd962a7240c2d328e3ac08793da48416040fa7b4351863b85d0e0043518c57e1b31db7cd5c433103e394bc262504fae6f7d42485c4f2
7
+ data.tar.gz: 38928914ecb2b8b5bbfc9fff9dacfce07a852d0c937e22b5ebea97dcccba77a7442ca0c9c61ad23bd0b224a6c26037cf2f9b08e34a984c39fe0aa3207b5e4e30
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.1.1](https://github.com/voxpupuli/beaker-docker/tree/3.1.1) (2026-01-31)
4
+
5
+ [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/3.1.0...3.1.1)
6
+
7
+ **Fixed bugs:**
8
+
9
+ - Handle both podman and docker to get SUT container IP address [\#180](https://github.com/voxpupuli/beaker-docker/pull/180) ([alelindq](https://github.com/alelindq))
10
+
3
11
  ## [3.1.0](https://github.com/voxpupuli/beaker-docker/tree/3.1.0) (2025-12-27)
4
12
 
5
13
  [Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/3.0.1...3.1.0)
@@ -164,7 +164,9 @@ module Beaker
164
164
 
165
165
  # Container to container
166
166
  unless ip && port
167
- ip = network_settings['IPAddress']
167
+ ip = network_settings['IPAddress'] # podman
168
+ # also handle scenarios where network_settings['IPAddress'] is not set (e.g. docker-ce >= v29)
169
+ ip = network_settings['Networks'][host_config['NetworkMode']]['IPAddress'] if ip.nil? || ip.empty?
168
170
  port = (ip && !ip.empty?) ? 22 : nil
169
171
  end
170
172
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BeakerDocker
4
- VERSION = '3.1.0'
4
+ VERSION = '3.1.1'
5
5
  end
@@ -688,6 +688,44 @@ module Beaker
688
688
  end
689
689
  end
690
690
  end
691
+
692
+ context 'when IPAddress is empty but available in Networks' do
693
+ let(:container_config) do
694
+ {
695
+ 'HostConfig' => {
696
+ 'NetworkMode' => 'bridge',
697
+ },
698
+ 'NetworkSettings' => {
699
+ 'IPAddress' => '',
700
+ 'Ports' => {
701
+ '22/tcp' => [
702
+ {
703
+ 'HostIp' => '0.0.0.0',
704
+ 'HostPort' => 8022,
705
+ },
706
+ ],
707
+ },
708
+ 'Gateway' => '192.0.2.254',
709
+ 'Networks' => {
710
+ 'bridge' => {
711
+ 'IPAddress' => '192.0.2.10',
712
+ },
713
+ },
714
+ },
715
+ }
716
+ end
717
+
718
+ it 'falls back to Networks[NetworkMode][IPAddress]' do
719
+ ENV['DOCKER_IN_DOCKER'] = 'true'
720
+ FakeFS do
721
+ FileUtils.touch('/.dockerenv')
722
+ docker.provision
723
+
724
+ expect(hosts[0]['ip']).to eq '192.0.2.10'
725
+ expect(hosts[0]['port']).to eq 22
726
+ end
727
+ end
728
+ end
691
729
  end
692
730
 
693
731
  it 'generates a new /etc/hosts file referencing each host' do
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: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli