accounts_ssh_authorized_keys_line_parser: Output regex matches when sshkey format isnt correct #105
Annotations
3 errors
Run tests:
spec/functions/accounts_ssh_authorized_keys_line_parser_spec.rb#L10
accounts_ssh_authorized_keys_line_parser is expected to run accounts_ssh_authorized_keys_line_parser("") and raise an ArgumentError with the message matching /Wrong Keyline format!/
Failure/Error: expect(subject).to run.with_params('').and_raise_error(ArgumentError, %r{Wrong Keyline format!})
expected accounts_ssh_authorized_keys_line_parser("") to have raised ArgumentError matching /Wrong Keyline format!/ instead of NoMethodError(undefined method `length' for nil:NilClass)
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/spec/fixtures/modules/accounts/lib/puppet/functions/accounts_ssh_authorized_keys_line_parser.rb:22:in `accounts_ssh_authorized_keys_line_parser_string'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/puppet-8.6.0/lib/puppet/pops/functions/dispatch.rb:62:in `invoke'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/puppet-8.6.0/lib/puppet/pops/functions/dispatcher.rb:48:in `block in dispatch'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/puppet-8.6.0/lib/puppet/pops/functions/dispatcher.rb:47:in `catch'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/puppet-8.6.0/lib/puppet/pops/functions/dispatcher.rb:47:in `dispatch'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/puppet-8.6.0/lib/puppet/pops/functions/function.rb:44:in `block in call'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/puppet-8.6.0/lib/puppet/pops/functions/function.rb:43:in `catch'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/puppet-8.6.0/lib/puppet/pops/functions/function.rb:43:in `call'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-puppet-4.0.2/lib/rspec-puppet/example/function_example_group.rb:21:in `block in execute'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/puppet-8.6.0/lib/puppet/context.rb:64:in `override'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/puppet-8.6.0/lib/puppet.rb:288:in `override'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-puppet-4.0.2/lib/rspec-puppet/example/function_example_group.rb:20:in `execute'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-puppet-4.0.2/lib/rspec-puppet/matchers/run.rb:12:in `matches?'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.13.0/lib/rspec/expectations/handler.rb:51:in `block in handle_matcher'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.13.0/lib/rspec/expectations/handler.rb:27:in `with_matcher'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.13.0/lib/rspec/expectations/handler.rb:48:in `handle_matcher'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.13.0/lib/rspec/expectations/expectation_target.rb:65:in `to'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.13.0/lib/rspec/expectations/expectation_target.rb:101:in `to'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/spec/functions/accounts_ssh_authorized_keys_line_parser_spec.rb:11:in `block (2 levels) in <top (required)>'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.13.0/lib/rspec/core/example.rb:263:in `instance_exec'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.13.0/lib/rspec/core/example.rb:263:in `block in run'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.13.0/lib/rspec/core/example.rb:511
|
Run tests:
spec/functions/accounts_ssh_authorized_keys_line_parser_spec.rb#L14
accounts_ssh_authorized_keys_line_parser is expected to run accounts_ssh_authorized_keys_line_parser("options unknown-keytype key comment") and raise an ArgumentError with the message matching /Wrong Keyline format!/
Failure/Error: expect(subject).to run.with_params('options unknown-keytype key comment').and_raise_error(ArgumentError, %r{Wrong Keyline format!})
expected accounts_ssh_authorized_keys_line_parser("options unknown-keytype key comment") to have raised ArgumentError matching /Wrong Keyline format!/ instead of NoMethodError(undefined method `length' for nil:NilClass)
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/spec/fixtures/modules/accounts/lib/puppet/functions/accounts_ssh_authorized_keys_line_parser.rb:22:in `accounts_ssh_authorized_keys_line_parser_string'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/puppet-8.6.0/lib/puppet/pops/functions/dispatch.rb:62:in `invoke'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/puppet-8.6.0/lib/puppet/pops/functions/dispatcher.rb:48:in `block in dispatch'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/puppet-8.6.0/lib/puppet/pops/functions/dispatcher.rb:47:in `catch'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/puppet-8.6.0/lib/puppet/pops/functions/dispatcher.rb:47:in `dispatch'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/puppet-8.6.0/lib/puppet/pops/functions/function.rb:44:in `block in call'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/puppet-8.6.0/lib/puppet/pops/functions/function.rb:43:in `catch'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/puppet-8.6.0/lib/puppet/pops/functions/function.rb:43:in `call'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-puppet-4.0.2/lib/rspec-puppet/example/function_example_group.rb:21:in `block in execute'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/puppet-8.6.0/lib/puppet/context.rb:64:in `override'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/puppet-8.6.0/lib/puppet.rb:288:in `override'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-puppet-4.0.2/lib/rspec-puppet/example/function_example_group.rb:20:in `execute'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-puppet-4.0.2/lib/rspec-puppet/matchers/run.rb:12:in `matches?'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.13.0/lib/rspec/expectations/handler.rb:51:in `block in handle_matcher'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.13.0/lib/rspec/expectations/handler.rb:27:in `with_matcher'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.13.0/lib/rspec/expectations/handler.rb:48:in `handle_matcher'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.13.0/lib/rspec/expectations/expectation_target.rb:65:in `to'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-expectations-3.13.0/lib/rspec/expectations/expectation_target.rb:101:in `to'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/spec/functions/accounts_ssh_authorized_keys_line_parser_spec.rb:15:in `block (2 levels) in <top (required)>'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.13.0/lib/rspec/core/example.rb:263:in `instance_exec'
/home/runner/work/puppetlabs-accounts/puppetlabs-accounts/vendor/bundle/ruby/3.2.0/gems/rspec-core-3.13.0/lib/rspec/core/example.rb:263:in `block in run'
/home/runner/work/puppetlabs-a
|
Run tests
Process completed with exit code 1.
|
Loading