hw-cookbooks/postgresql — pull request #204 by loupgaroublond (2014-10-30 19:45:03+00:00)
Title: Reorder where service is defined in relation to config files

We found that bad configuration settings can prevent the server from starting up. Since the service was defined before the config files, it was impossible for Chef to update the config files before starting the server. Chef would abort on startup error and never update the config files.

This pull request and patch solves this problem by defining the configuration files before the service definition. Chef has the opportunity to correct the files before attempting to start the service again.

No specs or tests included, how do you write one that handles things that span multiple chef runs and cover long term maintainability of servers?