Skip to content

Commit

Permalink
Mock out nginx in os-independent tests
Browse files Browse the repository at this point in the history
This defines a very minimal nginx class that is just enough to make the
os-independent tests pass:

Prior to this patch:

Finished in 15.21 seconds (files took 7.58 seconds to load)

After this patch:

Finished in 2.94 seconds (files took 7.66 seconds to load)
  • Loading branch information
ekohl committed Jul 4, 2023
1 parent 5c76fe5 commit 14be8a1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions spec/defines/resource_geo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,24 @@
end

describe 'os-independent items' do
let(:pre_condition) do
<<~PUPPET
class nginx::service {}

Check failure on line 36 in spec/defines/resource_geo_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Layout/HeredocIndentation: Use 2 spaces for indentation in a heredoc. (https://rubystyle.guide#squiggly-heredocs)
class nginx {
$root_group = 'root'
$conf_dir = '/etc/nginx'
$global_mode = '0644'
include nginx::service
file { [$conf_dir, "${conf_dir}/conf.d"]:
ensure => directory,
}
}
include nginx
PUPPET
end

describe 'basic assumptions' do
let(:params) { default_params }

Expand Down

0 comments on commit 14be8a1

Please sign in to comment.