From 39a08bd5f6e1e4bf9f98b8232ceb2d671b950341 Mon Sep 17 00:00:00 2001 From: Diego Tapia <64498901+dtapia-IT@users.noreply.github.com> Date: Wed, 15 May 2024 16:19:04 -0400 Subject: [PATCH] (roles/fiberspec_spec.rb) add role tests --- spec/hosts/roles/fiberspec_spec.rb | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 spec/hosts/roles/fiberspec_spec.rb diff --git a/spec/hosts/roles/fiberspec_spec.rb b/spec/hosts/roles/fiberspec_spec.rb new file mode 100644 index 0000000000..24f0179a4c --- /dev/null +++ b/spec/hosts/roles/fiberspec_spec.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +require 'spec_helper' + +role = 'fiberspec' + +describe "#{role} role" do + on_supported_os.each do |os, os_facts| + next unless os =~ %r{almalinux-9-x86_64} + + context "on #{os}" do + let(:facts) { os_facts } + let(:node_params) do + { + role: role, + site: site, + } + end + + lsst_sites.each do |site| + fqdn = "#{role}.#{site}.lsst.org" + override_facts(os_facts, fqdn: fqdn, networking: { fqdn => fqdn }) + + describe fqdn, :sitepp do + let(:site) { site } + + it { is_expected.to compile.with_all_deps } + + include_examples 'dco' + end # host + end # lsst_sites + end # on os + end # on_supported_os +end # role