Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
  • Loading branch information
clintoncwolfe committed Sep 11, 2019
1 parent bba7d56 commit c9753e0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion lib/inspec-vault/input.rb
Expand Up @@ -26,7 +26,6 @@ def initialize
)
end


# What priority should an input value recieve from us?
# This plgin does not currently allow setting this on a per-input basis,
# so they all recieve the same "default" value.
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/profiles/priority/controls/priority.rb
Expand Up @@ -34,6 +34,6 @@
it { should cmp "value_from_vault" } # DSL = 60, vault = 60 - tie - last wins
end
describe input("priority_check_threshold_61", value: "value_from_dsl", priority: 61) do
it { should cmp "value_from_dsl" } # DSL = 61, Vault = 60 - vault wins
it { should cmp "value_from_dsl" } # DSL = 61, Vault = 60 - vault wins
end
end
10 changes: 5 additions & 5 deletions test/integration/inspec_vault_test.rb
Expand Up @@ -25,14 +25,14 @@
describe "when run with custom priority values" do
def run_priority_test(priority, first_should_pass)
cmd = "exec #{profile_fixtures}/priority --reporter json"
env['INSPEC_VAULT_PRIORITY'] = priority
env["INSPEC_VAULT_PRIORITY"] = priority
result = run_inspec_with_vault_plugin(cmd, env: env)
json = JSON.parse(result.stdout)
ctls = json.dig("profiles", 0, "controls")
assert_equal "passed", ctls.dig(0,"results", 0, "status"), ctls.dig(0, "id")
assert_equal "passed", ctls.dig(1,"results", 0, "status"), ctls.dig(1, "id")
assert_equal (first_should_pass ? "passed" : "failed"), ctls.dig(2,"results", 0, "status"), ctls.dig(2, "id")
assert_equal (first_should_pass ? "failed" : "passed"), ctls.dig(2,"results", 1, "status"), ctls.dig(2, "id")
assert_equal "passed", ctls.dig(0, "results", 0, "status"), ctls.dig(0, "id")
assert_equal "passed", ctls.dig(1, "results", 0, "status"), ctls.dig(1, "id")
assert_equal (first_should_pass ? "passed" : "failed"), ctls.dig(2, "results", 0, "status"), ctls.dig(2, "id")
assert_equal (first_should_pass ? "failed" : "passed"), ctls.dig(2, "results", 1, "status"), ctls.dig(2, "id")
end

it "should be overridden by DSL when the priority is low" do
Expand Down

0 comments on commit c9753e0

Please sign in to comment.