Merge pull request #6110 from inspec/ss/add-resource-ids-group-11

CFINSPEC-272: resource_ids group 11
This commit is contained in:
Clinton Wolfe 2022-06-08 16:07:42 -04:00 committed by GitHub
commit 0ae8f52c19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 0 deletions

View file

@ -57,6 +57,10 @@ module Inspec::Resources
"SSH Configuration"
end
def resource_id
@conf_path || "SSH Configuration"
end
private
def read_content

View file

@ -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

View file

@ -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

View file

@ -112,6 +112,10 @@ module Inspec::Resources
end
end
def resource_id
"sys_info"
end
def to_s
"System Information"
end

View file

@ -52,6 +52,10 @@ module Inspec::Resources
@output["time_offset"]
end
def resource_id
"timezone"
end
def to_s
"Time Zone resource"
end

View file

@ -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