simp-beaker-helpers 1.34.0 → 1.34.2

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
  SHA256:
3
- metadata.gz: 1f134126c3a1b23c87a495aac126cd172bc1f261d9da6bcf5f488af22cbdade7
4
- data.tar.gz: 7a24de4dff9da4288b91995e6af7d5be0e58505116c1661e588d51cfcc5bfc0c
3
+ metadata.gz: d461f45ee5b0db860774ea2ef655a4a4c2d96701ce9e626d5a8d32fd7700a340
4
+ data.tar.gz: e09aab2048b638a82ffb57bee93186f4e8a524418dadea9fed46245853c0735e
5
5
  SHA512:
6
- metadata.gz: 69ce9cb283b5df89a141c540df080c670505bd9d1f65db91fdb53b96171e4a66e642f6d3850d26cb4939a3d04271f6766062d45610873f0b9a55a0c6913e0725
7
- data.tar.gz: 74f9426f0356d2b97ef1c7dbcb8eb568b200cdfbeaaa2c0581e87ac1118a7ad2cf0e8060f3a3c5a91d9f73bec963d0d1c570962f475507a6b1ddeb0cfeefdf29
6
+ metadata.gz: ae6d37b9fdff5dbe6bb33fabca8c2050fc29dcc54a8e8e3e7e5b2cc6b95b98360e6a9c34ebda0e3cb8af99acdf44516a211e83f03318c63c835bc9e8da844cb7
7
+ data.tar.gz: 2d04d5cfb87f07b196832aee4249493c1ca81b9cbed50a2f997c6103d73e6a8f6dc8b2025d41feb26fc3a1c9d287639cc6e790d047cd0f0dfdb6e1f3c4d33c15
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 1.34.2 / 2024-12-19
2
+ * Fixed:
3
+ * Update /etc/hosts when hostname changes (#224)
4
+
5
+ ### 1.34.1 / 2024-12-17
6
+ * Fixed:
7
+ * Error when no domain is set (#222)
8
+
1
9
  ### 1.34.0 / 2024-09-17
2
10
  * Fixed:
3
11
  * Legacy fact usage
@@ -3,5 +3,5 @@
3
3
  module Simp; end
4
4
 
5
5
  module Simp::BeakerHelpers
6
- VERSION = '1.34.0'
6
+ VERSION = '1.34.2'
7
7
  end
@@ -723,13 +723,13 @@ module Simp::BeakerHelpers
723
723
  os_info = fact_on(sut, 'os')
724
724
 
725
725
  # Make sure we have a domain on our host
726
- current_domain = fact_on(sut, 'networking.domain').strip
726
+ current_domain = fact_on(sut, 'networking.domain')&.strip
727
727
  hostname = fact_on(sut, 'networking.hostname').strip
728
728
 
729
- if current_domain.empty?
729
+ if current_domain.nil? || current_domain.empty?
730
730
  new_fqdn = hostname + '.beaker.test'
731
731
 
732
- safe_sed(sut, 's/#{hostname}.*/#{new_fqdn} #{hostname}/', '/etc/hosts')
732
+ safe_sed(sut, "s/#{hostname}.*/#{new_fqdn} #{hostname}/", '/etc/hosts')
733
733
 
734
734
  if !sut.which('hostnamectl').empty?
735
735
  on(sut, "hostnamectl set-hostname #{new_fqdn}")
@@ -744,9 +744,8 @@ module Simp::BeakerHelpers
744
744
  end
745
745
  end
746
746
 
747
- if fact_on(sut, 'networking.domain').strip.empty?
748
- fail("Error: hosts must have an FQDN, got domain='#{current_domain}'")
749
- end
747
+ current_domain = fact_on(sut, 'networking.domain')&.strip
748
+ fail("Error: hosts must have an FQDN, got domain='#{current_domain}'") if current_domain.nil? || current_domain.empty?
750
749
 
751
750
  # This may not exist in docker so just skip the whole thing
752
751
  if sut.file_exist?('/etc/ssh')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simp-beaker-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.34.0
4
+ version: 1.34.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Tessmer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-09-18 00:00:00.000000000 Z
12
+ date: 2024-12-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: beaker