mirror of
https://github.com/inspec/inspec
synced 2024-11-25 14:10:25 +00:00
Merge pull request #6110 from inspec/ss/add-resource-ids-group-11
CFINSPEC-272: resource_ids group 11
This commit is contained in:
commit
0ae8f52c19
6 changed files with 22 additions and 0 deletions
|
@ -57,6 +57,10 @@ module Inspec::Resources
|
|||
"SSH Configuration"
|
||||
end
|
||||
|
||||
def resource_id
|
||||
@conf_path || "SSH Configuration"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def read_content
|
||||
|
|
|
@ -29,6 +29,10 @@ module Inspec::Resources
|
|||
sql_query.row(0).column("Config Value").value
|
||||
end
|
||||
|
||||
def resource_id
|
||||
conf_param || "Sybase config settings"
|
||||
end
|
||||
|
||||
def to_s
|
||||
"Sybase Conf #{conf_param}"
|
||||
end
|
||||
|
|
|
@ -64,6 +64,10 @@ module Inspec::Resources
|
|||
DatabaseHelper::SQLQueryResult.new(isql_cmd, parse_csv_result(isql_cmd.stdout))
|
||||
end
|
||||
|
||||
def resource_id
|
||||
@database || "Sybase Session"
|
||||
end
|
||||
|
||||
def to_s
|
||||
"Sybase Session"
|
||||
end
|
||||
|
|
|
@ -112,6 +112,10 @@ module Inspec::Resources
|
|||
end
|
||||
end
|
||||
|
||||
def resource_id
|
||||
"sys_info"
|
||||
end
|
||||
|
||||
def to_s
|
||||
"System Information"
|
||||
end
|
||||
|
|
|
@ -52,6 +52,10 @@ module Inspec::Resources
|
|||
@output["time_offset"]
|
||||
end
|
||||
|
||||
def resource_id
|
||||
"timezone"
|
||||
end
|
||||
|
||||
def to_s
|
||||
"Time Zone resource"
|
||||
end
|
||||
|
|
|
@ -9,6 +9,7 @@ describe "Inspec::Resources::TimeZone" do
|
|||
_(resource.name).must_equal "IST"
|
||||
_(resource.time_offset).must_equal "+0530"
|
||||
_(resource.stderr).must_equal ""
|
||||
_(resource.resource_id).must_equal "timezone"
|
||||
end
|
||||
|
||||
it "verify time configurations" do
|
||||
|
@ -17,5 +18,6 @@ describe "Inspec::Resources::TimeZone" do
|
|||
_(resource.name).must_equal "India Standard Time"
|
||||
_(resource.time_offset).must_equal "05:30:00"
|
||||
_(resource.stderr).must_equal ""
|
||||
_(resource.resource_id).must_equal "timezone"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue