-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from chef/rename
Rename + Update
- Loading branch information
Showing
6 changed files
with
18 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ group :test do | |
end | ||
|
||
gem "vulcano", :git => "[email protected]:chef/vulcanosec.git" | ||
gem 'train', git: '[email protected]:chef/train.git' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# -*- encoding: utf-8 -*- | ||
# | ||
# Author:: Fletcher Nichol (<[email protected]>) | ||
# Author:: Christoph Hartmann (<[email protected]>) | ||
# | ||
# Copyright (C) 2015, Chef Software Inc. | ||
# | ||
|
@@ -16,21 +17,21 @@ | |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
require "kitchen/verifier/audit_version" | ||
require "kitchen/verifier/inspec_version" | ||
require "kitchen/verifier/base" | ||
|
||
module Kitchen | ||
|
||
module Verifier | ||
|
||
# Audit verifier for Kitchen. | ||
# InSpec verifier for Kitchen. | ||
# | ||
# @author Fletcher Nichol <[email protected]> | ||
class Audit < Kitchen::Verifier::Base | ||
class InSpec < Kitchen::Verifier::Base | ||
|
||
kitchen_verifier_api_version 1 | ||
|
||
plugin_version Kitchen::Verifier::AUDIT_VERSION | ||
plugin_version Kitchen::Verifier::INSPEC_VERSION | ||
|
||
# (see Base#call) | ||
def call(state) | ||
|
@@ -88,13 +89,12 @@ def local_suite_files | |
# @api private | ||
def runner_options_for_ssh(config_data) | ||
opts = instance.transport.send(:connection_options, config_data).dup | ||
|
||
{ | ||
"backend" => "ssh", | ||
"host" => opts[:hostname], | ||
"port" => opts[:port], | ||
"user" => opts[:username], | ||
"key_file" => opts[:keys] | ||
"key_files" => opts[:keys] | ||
} | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# -*- encoding: utf-8 -*- | ||
# | ||
# Author:: Fletcher Nichol (<[email protected]>) | ||
# Author:: Christoph Hartmann (<[email protected]>) | ||
# | ||
# Copyright (C) 2015, Chef Software Inc. | ||
# | ||
|
@@ -20,7 +21,7 @@ module Kitchen | |
|
||
module Verifier | ||
|
||
# Version string for Audit Kitchen verifier | ||
AUDIT_VERSION = "0.1.0" | ||
# Version string for InSpec Kitchen verifier | ||
INSPEC_VERSION = "0.1.0" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# -*- encoding: utf-8 -*- | ||
# | ||
# Author:: Fletcher Nichol (<[email protected]>) | ||
# Author:: Christoph Hartmann (<[email protected]>) | ||
# | ||
# Copyright (C) 2015, Chef Software Inc. | ||
# | ||
|
@@ -20,10 +21,10 @@ | |
|
||
require "logger" | ||
|
||
require "kitchen/verifier/audit" | ||
require "kitchen/verifier/inspec" | ||
require "kitchen/transport/ssh" | ||
|
||
describe Kitchen::Verifier::Audit do | ||
describe Kitchen::Verifier::InSpec do | ||
|
||
let(:logged_output) { StringIO.new } | ||
let(:logger) { Logger.new(logged_output) } | ||
|
@@ -72,16 +73,16 @@ | |
end | ||
|
||
let(:verifier) do | ||
Kitchen::Verifier::Audit.new(config).finalize_config!(instance) | ||
Kitchen::Verifier::InSpec.new(config).finalize_config!(instance) | ||
end | ||
|
||
it "verifier api_version is 1" do | ||
expect(verifier.diagnose_plugin[:api_version]).to eq(1) | ||
end | ||
|
||
it "plugin_version is set to Kitchen::Verifier::AUDIT_VERSION" do | ||
it "plugin_version is set to Kitchen::Verifier::INSPEC_VERSION" do | ||
expect(verifier.diagnose_plugin[:version]). | ||
to eq(Kitchen::Verifier::AUDIT_VERSION) | ||
to eq(Kitchen::Verifier::INSPEC_VERSION) | ||
end | ||
|
||
describe "configuration" do | ||
|
@@ -119,7 +120,7 @@ | |
"host" => "boogie", | ||
"port" => 123, | ||
"user" => "dance", | ||
"key_file" => ["/backstage/pass"] | ||
"key_files" => ["/backstage/pass"] | ||
)). | ||
and_return(runner) | ||
|
||
|