This repository has been archived by the owner on Oct 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add verifier.groups.x.backend; document attrs
This attribute allows a group to specify an InSpec backend.
- Loading branch information
Showing
24 changed files
with
175 additions
and
488 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
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
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
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
26 changes: 26 additions & 0 deletions
26
integration/Shell Words/test/integration/example/controls/attrs.rb
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# frozen_string_literal: true | ||
|
||
first_attribute = attribute "first", | ||
default: "first attrs.yml was not loaded", | ||
description: "This value should be loaded from test/integration/example/first attrs.yml." | ||
|
||
second_attribute = attribute "second", | ||
default: "second attrs.yml was not loaded", | ||
description: "This value should be loaded from test/integration/example/second attrs.yml." | ||
|
||
control "attrs" do | ||
desc "This control validates that the elements of the verifier.groups.x.attrs attribute are successfully passed to " \ | ||
"InSpec as attrs." | ||
|
||
describe first_attribute do | ||
it do | ||
should eq "first attrs.yml was loaded" | ||
end | ||
end | ||
|
||
describe second_attribute do | ||
it do | ||
should eq "second attrs.yml was loaded" | ||
end | ||
end | ||
end |
8 changes: 5 additions & 3 deletions
8
integration/Shell Words/test/integration/example/controls/operating_system.rb
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,9 +1,11 @@ | ||
# frozen_string_literal: true | ||
|
||
control "operating_system" do | ||
describe "the operating system" do | ||
subject do command("lsb_release -a").stdout end | ||
desc "This control validates the platform family of the operating system." | ||
|
||
it "is Ubuntu" do is_expected.to match /Ubuntu/ end | ||
describe os.family do | ||
it do | ||
should eq "debian" | ||
end | ||
end | ||
end |
1 change: 1 addition & 0 deletions
1
integration/Shell Words/test/integration/example/first attrs.yml
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
first: first attrs.yml was loaded |
1 change: 1 addition & 0 deletions
1
integration/Shell Words/test/integration/example/second attrs.yml
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
second: second attrs.yml was loaded |
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
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
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
8 changes: 5 additions & 3 deletions
8
integration/basic/test/integration/example/controls/operating_system.rb
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,9 +1,11 @@ | ||
# frozen_string_literal: true | ||
|
||
control "operating_system" do | ||
describe "the operating system" do | ||
subject do command("lsb_release -a").stdout end | ||
desc "This control validates the platform family of the operating system." | ||
|
||
it "is Ubuntu" do is_expected.to match /Ubuntu/ end | ||
describe os.family do | ||
it do | ||
should eq "debian" | ||
end | ||
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
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
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
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
output "backend_state" { | ||
description = "The path to the backend state file" | ||
value = "${path.module}/terraform.tfstate.d/${terraform.workspace}/terraform.tfstate" | ||
} | ||
|
||
output "hostnames" { | ||
description = "The hostnames to test" | ||
value = ["${docker_container.ubuntu.name}"] | ||
} |
8 changes: 5 additions & 3 deletions
8
integration/rake_tasks/test/integration/example/controls/operating_system.rb
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,9 +1,11 @@ | ||
# frozen_string_literal: true | ||
|
||
control "operating_system" do | ||
describe "the operating system" do | ||
subject do command("lsb_release -a").stdout end | ||
desc "This control validates the platform family of the operating system." | ||
|
||
it "is Ubuntu" do is_expected.to match /Ubuntu/ end | ||
describe os.family do | ||
it do | ||
should eq "debian" | ||
end | ||
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
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
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
32 changes: 0 additions & 32 deletions
32
lib/kitchen/verifier/terraform/configure_inspec_runner_backend.rb
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.