Skip to content

Commit

Permalink
Fixed invalid ssh config entry declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
etki committed Aug 8, 2017
1 parent 3310891 commit 05931e7
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
7 changes: 6 additions & 1 deletion .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ provisioner:
verifier:
name: inspec
format: "<% if ENV['INSPEC_DEBUG'] %>documentation<% else %>junit<% end %>"
output: "<% if ENV['INSPEC_DEBUG'] %>-<% else %>test/metadata/junit/acceptance/TEST-%{platform}-%{suite}.xml<%
output: "<% if ENV['INSPEC_DEBUG'] %>-<% else %>test/metadata/junit/acceptance/TEST-%{suite}-on-%{platform}.xml<%
end %>"
platforms:
- name: ubuntu-14.04
- name: ubuntu-16.04
- name: debian-7.11
- name: debian-8.9
- name: debian-9.1
- name: centos-7.2
- name: centos-6.5
- name: fedora-25
- name: fedora-26
suites:
- name: complex-case-1
run_list:
Expand Down
14 changes: 9 additions & 5 deletions tasks/test.acceptance.rake
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ root = ::File.dirname(__dir__)

namespace :test do
task :acceptance, [:platform] do |_, arguments|
command = 'bundle exec kitchen test'
command += ' ' + arguments[:platform] if arguments[:platform]
command += ' --concurrency'
sh command
Rake::Task[:'test:acceptance:allurize'].invoke
begin
Rake::Task[:'test:acceptance:setup'].invoke
command = 'bundle exec kitchen test'
command += ' ' + arguments[:platform] if arguments[:platform]
command += ' --concurrency'
sh command
ensure
Rake::Task[:'test:acceptance:allurize'].invoke
end
end

namespace :acceptance do
Expand Down
2 changes: 1 addition & 1 deletion test/suites/acceptance/default/libraries/private_key.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ def exist?
end

def to_s
"PrivateKey #{@definition}"
"private key #{@definition}"
end
end
2 changes: 1 addition & 1 deletion test/suites/acceptance/default/libraries/public_key.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ def exist?
end

def to_s
"PublicKey #{@definition}"
"public key #{@definition}"
end
end
6 changes: 3 additions & 3 deletions test/suites/acceptance/default/libraries/ssh_config_entry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ def initialize(definition)
end

def method_missing(name)
@entry[name.to_s] if @entry
return @entry[name.to_s] if @entry
super
end

def respond_to_missing?
true
def respond_to_missing?(name, *)
@entry && @entry.key?(name)
end

def exist?
Expand Down

0 comments on commit 05931e7

Please sign in to comment.