voxpupuli / puppet-corosync

Sets up and manages Corosync.
https://forge.puppet.com/puppet/corosync
Apache License 2.0
44 stars 161 forks source link

Unit tests don't run #536

Open dploeger opened 1 year ago

dploeger commented 1 year ago

How to reproduce

Run docker build . in the base repositoriy

What are you seeing

Nearly all tests are failing.

What behaviour did you expect instead

No tests fail.

Output log

(...)
13.01 Finished in 1.21 seconds (files took 7.35 seconds to load)
13.01 739 examples, 738 failures
13.01 
13.01 Failed examples:
13.01 
13.01 rspec './spec/classes/corosync_spec.rb[1:1:1]' # corosync on sles-15-x86_64 has the correct pcs version
13.01 rspec './spec/classes/corosync_spec.rb[1:1:5]' # corosync on sles-15-x86_64 installs the provider package
13.01 rspec './spec/classes/corosync_spec.rb[1:1:6]' # corosync on sles-15-x86_64 does manage the pacemaker service
13.01 rspec './spec/classes/corosync_spec.rb[1:1:2:1]' # corosync on sles-15-x86_64 without secauth 
13.01 rspec './spec/classes/corosync_spec.rb[1:1:2:2]' # corosync on sles-15-x86_64 without secauth disables secauth with corsync 2.x syntax
13.01 rspec './spec/classes/corosync_spec.rb[1:1:3:1]' # corosync on sles-15-x86_64 with secauth 
13.01 rspec './spec/classes/corosync_spec.rb[1:1:3:2]' # corosync on sles-15-x86_64 with secauth enables secauth with corsync 2.x syntax
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:1]' # corosync on sles-15-x86_64 configures corosync 
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:2]' # corosync on sles-15-x86_64 configures corosync does manage the corosync service
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:3]' # corosync on sles-15-x86_64 configures corosync validates the corosync configuration
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:4:1]' # corosync on sles-15-x86_64 configures corosync validates the corosncy configuration when config_validate_cmd is set validates with test_corosync_config_cmd
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:5:1]' # corosync on sles-15-x86_64 configures corosync when manage_corosync_service is false is not managing corosync service
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:6:1:1]' # corosync on sles-15-x86_64 configures corosync when set_votequorum is true when quorum_members is an array with 2 items configures votequorum
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:6:1:2:1]' # corosync on sles-15-x86_64 configures corosync when set_votequorum is true when quorum_members is an array with 2 items with node ids supports persistent node IDs
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:6:1:3:1]' # corosync on sles-15-x86_64 configures corosync when set_votequorum is true when quorum_members is an array with 2 items with node names supports persistent node names
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:6:2:1]' # corosync on sles-15-x86_64 configures corosync when set_votequorum is true when quorum_members is set to an array with 3 items does not configure two_nodes option
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:6:3:1]' # corosync on sles-15-x86_64 configures corosync when set_votequorum is true when quorum_members is not set and votequorum_expected_votes is set configures two_node
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:6:4:1]' # corosync on sles-15-x86_64 configures corosync when set_votequorum is true when quorum_members is set to an array with 2 items and votequorum_expected_votes is set configures nodelist
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:6:5:1]' # corosync on sles-15-x86_64 configures corosync when set_votequorum is true when quorum_members is an array of arrays configures rings for host 1 correctly
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:6:5:2]' # corosync on sles-15-x86_64 configures corosync when set_votequorum is true when quorum_members is an array of arrays configures rings for host 2 correctly
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:6:5:3]' # corosync on sles-15-x86_64 configures corosync when set_votequorum is true when quorum_members is an array of arrays configures rings for host 3 correctly
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:6:5:4]' # corosync on sles-15-x86_64 configures corosync when set_votequorum is true when quorum_members is an array of arrays configures rings for host 4 correctly
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:6:5:5]' # corosync on sles-15-x86_64 configures corosync when set_votequorum is true when quorum_members is an array of arrays does not configure two_nodes option
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:6:6:1]' # corosync on sles-15-x86_64 configures corosync when set_votequorum is true when quorum_members is an array of 2 arrays configures rings for host 1 correctly
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:6:6:2]' # corosync on sles-15-x86_64 configures corosync when set_votequorum is true when quorum_members is an array of 2 arrays configures rings for host 2 correctly
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:6:6:3]' # corosync on sles-15-x86_64 configures corosync when set_votequorum is true when quorum_members is an array of 2 arrays configures two_node
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:7:1:1]' # corosync on sles-15-x86_64 configures corosync when unicast is used when set_quorum is true configures votequorum
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:7:1:2]' # corosync on sles-15-x86_64 configures corosync when unicast is used when set_quorum is true supports persistent node IDs
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:7:1:3]' # corosync on sles-15-x86_64 configures corosync when unicast is used when set_quorum is true supports persistent node names
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:7:2:1]' # corosync on sles-15-x86_64 configures corosync when unicast is used with one ring configures the ring properly
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:7:3:1]' # corosync on sles-15-x86_64 configures corosync when unicast is used with multiple rings  configures the rings properly
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:8:1]' # corosync on sles-15-x86_64 configures corosync when cluster_name is not set 
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:9:1]' # corosync on sles-15-x86_64 configures corosync when cluster_name is set configures cluster_name
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:10:1]' # corosync on sles-15-x86_64 configures corosync when authkey is a string deploys authkey file
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:11:1]' # corosync on sles-15-x86_64 configures corosync when authkey is a file deploys authkey file
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:12:1]' # corosync on sles-15-x86_64 configures corosync when multicast_address, unicast_addresses and cluster_name are not set raises error
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:13:1]' # corosync on sles-15-x86_64 configures corosync when only cluster_name is set does not configure multicast
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:14:1]' # corosync on sles-15-x86_64 configures corosync when log_timestamp is not set does not set timestamp
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:15:1]' # corosync on sles-15-x86_64 configures corosync when log_timestamp is false does not set timestamp
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:16:1]' # corosync on sles-15-x86_64 configures corosync when log_timestamp is set does set timestamp
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:17:1]' # corosync on sles-15-x86_64 configures corosync when log_file is not set does set to_logfile
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:17:2]' # corosync on sles-15-x86_64 configures corosync when log_file is not set does not set logfile
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:18:1]' # corosync on sles-15-x86_64 configures corosync with undefined watchdog_device does not configure watchdog_device resource
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:19:1]' # corosync on sles-15-x86_64 configures corosync with defined watchdog_device configures watchdog_device resource
13.01 rspec './spec/classes/corosync_spec.rb[1:1:4:20:1]' # corosync on sles-15-x86_64 configures corosync when log_file and log_file_name are set does set to_logfile
(...)

Any additional information you'd like to impart

I wanted to supply a feature and before changing the code I'd like to make sure, the code is clean. But I can't successfuly run the unit tests.

I'm on a M1 machine with macOS 13.6.

Running it directly using ruby 2.7, I get the following failing tests:

rspec './spec/classes/corosync_qdevice_spec.rb[1:4:1:1]' # corosync::qdevice on debian-11-x86_64 standard quorum node install does install pcs
rspec './spec/classes/corosync_qdevice_spec.rb[1:4:1:2]' # corosync::qdevice on debian-11-x86_64 standard quorum node install does install corosync-qnetd
rspec './spec/classes/corosync_qdevice_spec.rb[1:4:1:3]' # corosync::qdevice on debian-11-x86_64 standard quorum node install creates the cluster group
rspec './spec/classes/corosync_qdevice_spec.rb[1:4:1:4]' # corosync::qdevice on debian-11-x86_64 standard quorum node install sets the hacluster password
rspec './spec/classes/corosync_qdevice_spec.rb[1:4:1:5]' # corosync::qdevice on debian-11-x86_64 standard quorum node install configures the pcsd service
rspec './spec/classes/corosync_qdevice_spec.rb[1:4:1:6]' # corosync::qdevice on debian-11-x86_64 standard quorum node install configures the net quorum device
rspec './spec/classes/corosync_qdevice_spec.rb[1:4:1:7]' # corosync::qdevice on debian-11-x86_64 standard quorum node install makes sure the net quorum device is started
rspec './spec/classes/corosync_qdevice_spec.rb[1:8:1:1]' # corosync::qdevice on debian-10-x86_64 standard quorum node install does install pcs
rspec './spec/classes/corosync_qdevice_spec.rb[1:8:1:2]' # corosync::qdevice on debian-10-x86_64 standard quorum node install does install corosync-qnetd
rspec './spec/classes/corosync_qdevice_spec.rb[1:8:1:3]' # corosync::qdevice on debian-10-x86_64 standard quorum node install creates the cluster group
rspec './spec/classes/corosync_qdevice_spec.rb[1:8:1:4]' # corosync::qdevice on debian-10-x86_64 standard quorum node install sets the hacluster password
rspec './spec/classes/corosync_qdevice_spec.rb[1:8:1:5]' # corosync::qdevice on debian-10-x86_64 standard quorum node install configures the pcsd service
rspec './spec/classes/corosync_qdevice_spec.rb[1:8:1:6]' # corosync::qdevice on debian-10-x86_64 standard quorum node install configures the net quorum device
rspec './spec/classes/corosync_qdevice_spec.rb[1:8:1:7]' # corosync::qdevice on debian-10-x86_64 standard quorum node install makes sure the net quorum device is started
zilchms commented 9 months ago

Hey @dploeger , we fixed the CI in #520 Can you check if everything is working as you would expect it to?

dploeger commented 9 months ago

@zilchms There still seems to be some checks failing. https://github.com/voxpupuli/puppet-corosync/pull/538#issuecomment-1956516652

zilchms commented 9 months ago

Hmmm, okay. Will take a look once I find the time, might take a while though :)