voxpupuli / puppet-caddy

Puppet Caddy module
MIT License
6 stars 12 forks source link

Acceptance tests do not pass in Vagrant #91

Closed smortex closed 1 year ago

smortex commented 1 year ago

When running the acceptance tests on Vagrant, CI fail: the service does not always start correctly and the catalog does not impotently apply:

Failures:

  1) class caddy: with vhosts behaves like an idempotent resource applies a second time without changes
     Failure/Error: raise CommandFailure, "Host '#{self}' exited with #{result.exit_code} running:\n #{cmdline}\nLast #{@options[:trace_limit]} lines of output were:\n#{result.formatted_output(@options[:trace_limit])}"
     Beaker::Host::CommandFailure:
       Host 'debian11-64-1' exited with 2 running:
        puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_084435541.pp.VJjIVn
       Last 10 lines of output were:
        Info: Loading facts
        Info: Loading facts
        Notice: Compiled catalog for debian11-64-1 in environment production in 0.22 seconds
        Info: Using environment 'production'
        Info: Applying configuration version '1689187478'
        Warning: Private key for 'debian11-64-1' does not exist
        Warning: Client certificate for 'debian11-64-1' does not exist
        Notice: /Stage[main]/Caddy::Service/Systemd::Unit_file[caddy.service]/Service[caddy.service]/ensure: ensure changed 'stopped' to 'running'
        Info: /Stage[main]/Caddy::Service/Systemd::Unit_file[caddy.service]/Service[caddy.service]: Unscheduling refresh on Service[caddy.service]
        Notice: Applied catalog in 1.22 seconds

     Shared Example Group: "an idempotent resource" called from ./spec/acceptance/init_spec.rb:30
     # /home/romain/.bundle/vendor/ruby/2.7.0/gems/beaker-5.3.0/lib/beaker/host.rb:351:in `exec'
     # /home/romain/.bundle/vendor/ruby/2.7.0/gems/beaker-5.3.0/lib/beaker/dsl/helpers/host_helpers.rb:80:in `block in on'
     # /home/romain/.bundle/vendor/ruby/2.7.0/gems/beaker-5.3.0/lib/beaker/shared/host_manager.rb:125:in `run_block_on'
     # /home/romain/.bundle/vendor/ruby/2.7.0/gems/beaker-5.3.0/lib/beaker/dsl/patterns.rb:36:in `block_on'
     # /home/romain/.bundle/vendor/ruby/2.7.0/gems/beaker-5.3.0/lib/beaker/dsl/helpers/host_helpers.rb:62:in `on'
     # /home/romain/.bundle/vendor/ruby/2.7.0/gems/beaker_puppet_helpers-1.1.1/lib/beaker_puppet_helpers/dsl.rb:180:in `block in apply_manifest_on'
     # /home/romain/.bundle/vendor/ruby/2.7.0/gems/beaker-5.3.0/lib/beaker/shared/host_manager.rb:125:in `run_block_on'
     # /home/romain/.bundle/vendor/ruby/2.7.0/gems/beaker-5.3.0/lib/beaker/dsl/patterns.rb:36:in `block_on'
     # /home/romain/.bundle/vendor/ruby/2.7.0/gems/beaker_puppet_helpers-1.1.1/lib/beaker_puppet_helpers/dsl.rb:110:in `apply_manifest_on'
     # /home/romain/.bundle/vendor/ruby/2.7.0/gems/voxpupuli-acceptance-2.1.0/lib/voxpupuli/acceptance/examples.rb:9:in `block (2 levels) in <top (required)>'

Finished in 1 minute 3.8 seconds (files took 1 minute 35.65 seconds to load)
6 examples, 1 failure