From 6214f4a2d10a32bacdf59cbe87fbeace5fd701ce Mon Sep 17 00:00:00 2001 From: Lance Albertson Date: Tue, 13 Jul 2021 17:16:01 -0700 Subject: [PATCH] Loosen version pin to bind cookbook They still haven't released the cookbook however they've updated the release to 3.1.0 which is breaking tests globally. This should resolve the issue. Also apply fixes for using the resolver 3.x cookbook. Change-Id: I5b0a6783f0602983baeaf8b0e9bb90f150212644 Depends-On: https://review.opendev.org/c/openstack/openstack-chef/+/800841 Signed-off-by: Lance Albertson --- metadata.rb | 6 +++--- recipes/dns.rb | 6 +++--- spec/dns-rhel_spec.rb | 11 ++++------- spec/dns_spec.rb | 11 ++++------- 4 files changed, 14 insertions(+), 20 deletions(-) diff --git a/metadata.rb b/metadata.rb index 03be561..1f9d72b 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,18 +3,18 @@ maintainer 'openstack-chef' maintainer_email 'openstack-discuss@lists.openstack.org' license 'Apache-2.0' description 'Installs and configures the Tempest Integration Test Suite' -version '19.0.0' +version '19.1.0' %w(ubuntu redhat centos).each do |os| supports os end -depends 'bind', '~> 2.3.1' +depends 'bind', '~> 3.1.0' depends 'openstackclient' depends 'openstack-common', '>= 19.0.0' depends 'openstack-dns', '>= 19.0.0' depends 'openstack-image', '>= 19.0.0' -depends 'resolver' +depends 'resolver', '>= 3.0.0' issues_url 'https://launchpad.net/openstack-chef' source_url 'https://opendev.org/openstack/cookbook-openstack-integration-test' diff --git a/recipes/dns.rb b/recipes/dns.rb index 54c8d50..9c2b65d 100644 --- a/recipes/dns.rb +++ b/recipes/dns.rb @@ -33,10 +33,10 @@ end # Match what opendev/base-jobs uses for unbound: # https://opendev.org/opendev/base-jobs/src/branch/master/roles/configure-unbound/defaults/main.yaml#L1-L7 -node.default['resolver']['search'] = [] -node.default['resolver']['nameservers'] = %w(1.0.0.1 8.8.8.8) -include_recipe 'resolver' +resolver_config '/etc/resolv.conf' do + nameservers %w(1.0.0.1 8.8.8.8) +end # Disable and stop unbound so we can properly test Designate service 'unbound' do diff --git a/spec/dns-rhel_spec.rb b/spec/dns-rhel_spec.rb index 63b502c..b53972d 100644 --- a/spec/dns-rhel_spec.rb +++ b/spec/dns-rhel_spec.rb @@ -11,13 +11,10 @@ describe 'openstack-integration-test::dns' do include_context 'tempest-stubs' - [ - /^nameserver 1.0.0.1$/, - /^nameserver 8.8.8.8$/, - ].each do |line| - it do - expect(chef_run).to render_file('/etc/resolv.conf').with_content(line) - end + it do + expect(chef_run).to set_resolver_config('/etc/resolv.conf').with( + nameservers: %w(1.0.0.1 8.8.8.8) + ) end it do diff --git a/spec/dns_spec.rb b/spec/dns_spec.rb index 3fb3bc8..9c3d669 100644 --- a/spec/dns_spec.rb +++ b/spec/dns_spec.rb @@ -16,13 +16,10 @@ describe 'openstack-integration-test::dns' do expect(chef_run).to disable_service('systemd-resolved') end - [ - /^nameserver 1.0.0.1$/, - /^nameserver 8.8.8.8$/, - ].each do |line| - it do - expect(chef_run).to render_file('/etc/resolv.conf').with_content(line) - end + it do + expect(chef_run).to set_resolver_config('/etc/resolv.conf').with( + nameservers: %w(1.0.0.1 8.8.8.8) + ) end it do