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

undefined method `addresses' for Port #555

Closed
scalp42 opened this issue Mar 18, 2016 · 2 comments · Fixed by #558
Closed

undefined method `addresses' for Port #555

scalp42 opened this issue Mar 18, 2016 · 2 comments · Fixed by #558
Labels
Type: Enhancement Improves an existing feature

Comments

@scalp42
Copy link

scalp42 commented Mar 18, 2016

Assuming a java app listening on port 8090:

describe port(8090) do
  it { should be_listening }
  its('processes') {should include 'java'}
  its('protocols') { should eq ['tcp6'] }
  its('addresses') {should include '0.0.0.0'}
end

I'm getting the following error:

Failures:

  1) Port  8090 addresses
     Failure/Error: inner_subject.send(attr)

     NoMethodError:
       undefined method `addresses' for Port  8090:#<Class:0x007fc3662a5248>
     # ./test/integration/master/inspec/chronos_spec.rb:60:in `block (2 levels) in load'
     # /Users/scalp/.rvm/gems/ruby-2.2.4@chef/gems/inspec-0.14.8/lib/inspec/runner_rspec.rb:55:in `run'
     # /Users/scalp/.rvm/gems/ruby-2.2.4@chef/gems/kitchen-inspec-0.12.3/lib/kitchen/verifier/inspec.rb:73:in `call'
     # /Users/scalp/.rvm/gems/ruby-2.2.4@chef/gems/test-kitchen-1.6.0/lib/kitchen/instance.rb:423:in `block in verify_action'
     # /Users/scalp/.rvm/gems/ruby-2.2.4@chef/gems/test-kitchen-1.6.0/lib/kitchen/instance.rb:513:in `call'
     # /Users/scalp/.rvm/gems/ruby-2.2.4@chef/gems/test-kitchen-1.6.0/lib/kitchen/instance.rb:513:in `synchronize_or_call'
     # /Users/scalp/.rvm/gems/ruby-2.2.4@chef/gems/test-kitchen-1.6.0/lib/kitchen/instance.rb:478:in `block in action'
     # /Users/scalp/.rvm/gems/ruby-2.2.4@chef/gems/test-kitchen-1.6.0/lib/kitchen/instance.rb:477:in `action'
     # /Users/scalp/.rvm/gems/ruby-2.2.4@chef/gems/test-kitchen-1.6.0/lib/kitchen/instance.rb:415:in `verify_action'
     # /Users/scalp/.rvm/gems/ruby-2.2.4@chef/gems/test-kitchen-1.6.0/lib/kitchen/instance.rb:348:in `block in transition_to'
     # /Users/scalp/.rvm/gems/ruby-2.2.4@chef/gems/test-kitchen-1.6.0/lib/kitchen/instance.rb:347:in `each'
     # /Users/scalp/.rvm/gems/ruby-2.2.4@chef/gems/test-kitchen-1.6.0/lib/kitchen/instance.rb:347:in `transition_to'
     # /Users/scalp/.rvm/gems/ruby-2.2.4@chef/gems/test-kitchen-1.6.0/lib/kitchen/instance.rb:160:in `verify'
     # /Users/scalp/.rvm/gems/ruby-2.2.4@chef/gems/test-kitchen-1.6.0/lib/kitchen/command.rb:176:in `public_send'
     # /Users/scalp/.rvm/gems/ruby-2.2.4@chef/gems/test-kitchen-1.6.0/lib/kitchen/command.rb:176:in `block (2 levels) in run_action'

Finished in 2.47 seconds (files took 0.50982 seconds to load)
199 examples, 1 failure

I can get around it by using netcat or something but figured should open an issue 😇

@chris-rock chris-rock added Type: Enhancement Improves an existing feature feature request labels Mar 19, 2016
@chris-rock
Copy link
Contributor

Thanks @scalp42 for reporting this missing feature. It has not been implemented yet :-)

@scalp42
Copy link
Author

scalp42 commented Mar 19, 2016

Saw it in the docs, actually thought it was 😇

Thanks @chris-rock !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Improves an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants