rabbitmq / chef-cookbook

Development repository for Chef cookbook RabbitMQ
https://supermarket.chef.io/cookbooks/rabbitmq
Apache License 2.0
214 stars 424 forks source link

Tests are broken… #434

Closed rmoriz closed 7 years ago

rmoriz commented 7 years ago

https://travis-ci.org/rabbitmq/chef-cookbook/builds

all red…

rmoriz commented 7 years ago

I have spent quite some time on the weekend and opened a couple of PRs. (#436, #437, #438).

There is still a lot of work todo because some tests don't actually do something. Especially the 'cluster' path is untested in Chefspec and in the test-cookbook and the real cookbook code looks scary/broken (that .to_json + a resource that requires a String as its name property).

Many recipes in the test-cookbook are untested as well. (iirc all except "default"). There are orphaned minitests left, too.

After fixing the Docker issue I've converted the serverspec tests to inspec and more tests are turning green now.

Still broken are old CentOS and Debian 7 because recent RabbitMQ versions need a newer Erlang…

jjasghar commented 7 years ago

this is amazing. thank you for this. 🥇 💯

michaelklishin commented 7 years ago

I concur, thank you very much!

On Mon, Apr 24, 2017 at 6:58 PM, JJ Asghar notifications@github.com wrote:

this is amazing. thank you for this. 🥇 💯

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rabbitmq/chef-cookbook/issues/434#issuecomment-296743693, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAEQhGELD97axfu3uMN5133nHRFw3A2ks5rzNTDgaJpZM4NFGiR .

-- MK

Staff Software Engineer, Pivotal/RabbitMQ

rmoriz commented 7 years ago

Okay, there are plenty of issues/refactoring tasks left ;-)

I've just tried to fix the things that break the current CI setup.

Just a couple of notes:

Debian 7 The official RabbitMQ .deb seems to require the init-system-helpers package which is not available on Debian 7. I've changed the default to stick with the old RabbitMQ package from Debian 7, however LWRP-tests fail because the management interface does not work with it and the rabbitmqadmin script can't be downloaded. I've decativated the LWRP-kitchen for debian7 in the kitchen but IMHO you should consider sunsetting Debian 7 support at all.

CentOS 6

Some weird hostname error. The image defaults to "localhost.localdomain" and not a random hostname (which should be the default using docker and dokken) which forced me to this hack: https://github.com/rabbitmq/chef-cookbook/pull/438/commits/ccc685e451b96b5c023f72a8905a0e2f4bd683e7 => When executed via "kitchen login ..." it works well, because HOSTNAME is set, however inspec fails…

ChefSpec I've changed the default fauxhai/os version for redhat to '7.2'.

Travis I configured the matrix so that each combo of OS x kitchen suite appears as a single element.

Let's see, if the PR is now green...

michaelklishin commented 7 years ago

@rmoriz http://www.rabbitmq.com/install-debian.html explains how to install dependencies on older Debian and Ubuntu releases. init-system-helpers is available from the Debian Wheezy backports repository, for example.

rmoriz commented 7 years ago

@michaelklishin sure, but it was/is not implemented => new feature. My motivation here was just to get CI working on CentOS and Ubuntu (well, I did a lot more but that was just goodwill) because the integration test-stack of acme-chef depends on it.

michaelklishin commented 7 years ago

While I'm sure there's plenty of improvement, #438 makes 30 matrix rows pass. Wow.