Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for the AMQP plugin and fix broken StoreRates configuration when amqpformat = JSON #661

Merged
merged 3 commits into from
Apr 2, 2017

Conversation

oranenj
Copy link
Contributor

@oranenj oranenj commented Apr 1, 2017

I wrote some tests and caught a bug, it seems.

Not much to say other than that. These tests aren't complete, but they're something.

@oranenj
Copy link
Contributor Author

oranenj commented Apr 1, 2017

... And rebased my temporary commits.

@bastelfreak
Copy link
Member

Hi @oranenj, thanks for the PR! Travis is a bit buggy right now, I'm looking into this. Can you check the used email address in your commits? The address isn't associated with your github account.

@bastelfreak bastelfreak added enhancement New feature or request needs-work not ready to merge just yet labels Apr 2, 2017
@oranenj
Copy link
Contributor Author

oranenj commented Apr 2, 2017

Blaargh, again? I thought I changed my default gitconfig.

@bastelfreak
Copy link
Member

@oranenj can you take a look at the rubocop errors?

@oranenj
Copy link
Contributor Author

oranenj commented Apr 2, 2017

@bastelfreak of course I forgot that. Ran it and rebased...

@oranenj
Copy link
Contributor Author

oranenj commented Apr 2, 2017

Uh, the test failure is not showing me any red, and the output from parallel tests is extremely confusing... I think it's this part that caused the failure:

Coverage report sent to Coveralls.

    Will create /etc/collectd.d/network-server-node1.conf for collectd >= 4.7

  :ensure => absent

/home/travis/build/voxpupuli/puppet-collectd/vendor/bundle/ruby/2.1.0/gems/json_pure-1.8.6/lib/json/common.rb:155:in `initialize': A JSON text must at least contain two octets! (JSON::ParserError)

	from /home/travis/build/voxpupuli/puppet-collectd/vendor/bundle/ruby/2.1.0/gems/json_pure-1.8.6/lib/json/common.rb:155:in `new'

	from /home/travis/build/voxpupuli/puppet-collectd/vendor/bundle/ruby/2.1.0/gems/json_pure-1.8.6/lib/json/common.rb:155:in `parse'

	from /home/travis/build/voxpupuli/puppet-collectd/vendor/bundle/ruby/2.1.0/gems/simplecov-0.12.0/lib/simplecov/last_run.rb:12:in `read'

	from /home/travis/build/voxpupuli/puppet-collectd/vendor/bundle/ruby/2.1.0/gems/simplecov-0.12.0/lib/simplecov/defaults.rb:80:in `block in <top (required)>'

      Will not create 10-amqp.conf

@oranenj
Copy link
Contributor Author

oranenj commented Apr 2, 2017

Hmm, locally I get this:

python_dir
  is empty string if python not installed
  python dir
    default path
      example at ./spec/unit/python_dir_spec.rb:12 (FAILED - 1)
    RedHat
      should eq "/usr/lib/python2.7/site-packages"

@oranenj
Copy link
Contributor Author

oranenj commented Apr 2, 2017

  1) python_dir python dir default path 
     Failure/Error: Facter::Util::Resolution.exec('python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"')
     
     Mocha::ExpectationError:
       unexpected invocation: Facter::Util::Resolution.exec('python -c \'from distutils.sysconfig import get_python_lib; print(get_python_lib())\'')

Hmm

@oranenj
Copy link
Contributor Author

oranenj commented Apr 2, 2017

All tests pass for me locally now. If they still fail on travis, something else is going on.

@bastelfreak
Copy link
Member

Thanks!

@bastelfreak bastelfreak merged commit f9c7520 into voxpupuli:master Apr 2, 2017
@bastelfreak bastelfreak removed the needs-work not ready to merge just yet label Apr 2, 2017
@oranenj oranenj deleted the amqp_tests branch April 2, 2017 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants