flapjack / omnibus-flapjack

Flapjack packages for all! Build the packages, and update the repositories.
http://flapjack.io
23 stars 14 forks source link

Package tests failing for 1.3.0rc1 CentOS 6 #74

Closed jessereynolds closed 9 years ago

jessereynolds commented 9 years ago
Failures:

  1) File "/var/log/flapjack/flapjack.log" should be owned by "flapjack"
     Failure/Error: it { should be_owned_by 'flapjack' }
       expected `File "/var/log/flapjack/flapjack.log".owned_by?("flapjack")` to return true, got false
       /bin/sh -c stat\ -c\ \%U\ /var/log/flapjack/flapjack.log\ \|\ grep\ --\ \\\^flapjack\\\$

     # ./spec/serverspec/flapjack_spec.rb:68:in `block (2 levels) in <top (required)>'

  2) File "/var/log/flapjack/flapjack.log" should be grouped into "flapjack"
     Failure/Error: it { should be_grouped_into 'flapjack' }
       expected `File "/var/log/flapjack/flapjack.log".grouped_into?("flapjack")` to return true, got false
       /bin/sh -c stat\ -c\ \%G\ /var/log/flapjack/flapjack.log\ \|\ grep\ --\ \\\^flapjack\\\$

     # ./spec/serverspec/flapjack_spec.rb:69:in `block (2 levels) in <top (required)>'

  3) File "/var/log/flapjack/notification.log" should be owned by "flapjack"
     Failure/Error: it { should be_owned_by 'flapjack' }
       expected `File "/var/log/flapjack/notification.log".owned_by?("flapjack")` to return true, got false
       /bin/sh -c stat\ -c\ \%U\ /var/log/flapjack/notification.log\ \|\ grep\ --\ \\\^flapjack\\\$

     # ./spec/serverspec/flapjack_spec.rb:75:in `block (2 levels) in <top (required)>'

  4) File "/var/log/flapjack/notification.log" should be grouped into "flapjack"
     Failure/Error: it { should be_grouped_into 'flapjack' }
       expected `File "/var/log/flapjack/notification.log".grouped_into?("flapjack")` to return true, got false
       /bin/sh -c stat\ -c\ \%G\ /var/log/flapjack/notification.log\ \|\ grep\ --\ \\\^flapjack\\\$

     # ./spec/serverspec/flapjack_spec.rb:76:in `block (2 levels) in <top (required)>'

  5) File "/var/log/flapjack/jsonapi_access.log" should be owned by "flapjack"
     Failure/Error: it { should be_owned_by 'flapjack' }
       expected `File "/var/log/flapjack/jsonapi_access.log".owned_by?("flapjack")` to return true, got false
       /bin/sh -c stat\ -c\ \%U\ /var/log/flapjack/jsonapi_access.log\ \|\ grep\ --\ \\\^flapjack\\\$

     # ./spec/serverspec/flapjack_spec.rb:82:in `block (2 levels) in <top (required)>'

  6) File "/var/log/flapjack/jsonapi_access.log" should be grouped into "flapjack"
     Failure/Error: it { should be_grouped_into 'flapjack' }
       expected `File "/var/log/flapjack/jsonapi_access.log".grouped_into?("flapjack")` to return true, got false
       /bin/sh -c stat\ -c\ \%G\ /var/log/flapjack/jsonapi_access.log\ \|\ grep\ --\ \\\^flapjack\\\$

     # ./spec/serverspec/flapjack_spec.rb:83:in `block (2 levels) in <top (required)>'

  7) File "/var/log/flapjack/web_access.log" should be owned by "flapjack"
     Failure/Error: it { should be_owned_by 'flapjack' }
       expected `File "/var/log/flapjack/web_access.log".owned_by?("flapjack")` to return true, got false
       /bin/sh -c stat\ -c\ \%U\ /var/log/flapjack/web_access.log\ \|\ grep\ --\ \\\^flapjack\\\$

     # ./spec/serverspec/flapjack_spec.rb:96:in `block (2 levels) in <top (required)>'

  8) File "/var/log/flapjack/web_access.log" should be grouped into "flapjack"
     Failure/Error: it { should be_grouped_into 'flapjack' }
       expected `File "/var/log/flapjack/web_access.log".grouped_into?("flapjack")` to return true, got false
       /bin/sh -c stat\ -c\ \%G\ /var/log/flapjack/web_access.log\ \|\ grep\ --\ \\\^flapjack\\\$

     # ./spec/serverspec/flapjack_spec.rb:97:in `block (2 levels) in <top (required)>'

Finished in 3.11 seconds (files took 0.70334 seconds to load)
48 examples, 8 failures

Failed examples:

rspec ./spec/serverspec/flapjack_spec.rb:68 # File "/var/log/flapjack/flapjack.log" should be owned by "flapjack"
rspec ./spec/serverspec/flapjack_spec.rb:69 # File "/var/log/flapjack/flapjack.log" should be grouped into "flapjack"
rspec ./spec/serverspec/flapjack_spec.rb:75 # File "/var/log/flapjack/notification.log" should be owned by "flapjack"
rspec ./spec/serverspec/flapjack_spec.rb:76 # File "/var/log/flapjack/notification.log" should be grouped into "flapjack"
rspec ./spec/serverspec/flapjack_spec.rb:82 # File "/var/log/flapjack/jsonapi_access.log" should be owned by "flapjack"
rspec ./spec/serverspec/flapjack_spec.rb:83 # File "/var/log/flapjack/jsonapi_access.log" should be grouped into "flapjack"
rspec ./spec/serverspec/flapjack_spec.rb:96 # File "/var/log/flapjack/web_access.log" should be owned by "flapjack"
rspec ./spec/serverspec/flapjack_spec.rb:97 # File "/var/log/flapjack/web_access.log" should be grouped into "flapjack"
Sarah-E-Greene commented 9 years ago

This was a weird one, all to do with chown -R /var/log/flapjack in the postinst.

On debian-based distros, we do the following:

However, on centos, we do the following:

I've now removed these ownership tests, and moved the uninstall/reinstall code to happen after all the other tests happen.