mirror of
https://github.com/inspec/inspec
synced 2024-12-04 18:39:43 +00:00
712ba520ad
* adding SQL 2012 SP1 for mssql_session testing Signed-off-by: Vern Burton <me@vernburton.com> * updating SHA to match new commands with ports in them Signed-off-by: Vern Burton <me@vernburton.com> * adding port, and a default value and moving from skip_resource to resource_fail Signed-off-by: Vern Burton <me@vernburton.com> * adding new sha for custom host Signed-off-by: Vern Burton <me@vernburton.com> * adding tests for hostname and migrating test that passed port in host to a dedicated port test Signed-off-by: Vern Burton <me@vernburton.com> * adding integration test Signed-off-by: Vern Burton <me@vernburton.com> * removing services as appveyor does not have integration testing running so it would be a waste of time to enable it Signed-off-by: Vern Burton <me@vernburton.com> * mock instance command Signed-off-by: Vern Burton <me@vernburton.com> * making instance readable Signed-off-by: Vern Burton <me@vernburton.com> * adding instance test Signed-off-by: Vern Burton <me@vernburton.com> * moving to ResourceSkipped as ResourceFailed is targeted for a major release Signed-off-by: Vern Burton <me@vernburton.com>
12 lines
654 B
Ruby
12 lines
654 B
Ruby
# encoding: utf-8
|
|
|
|
# the following test will query the MSSQL database for the Server Property of IsIntegratedSecurityOnly which should be
|
|
# 0 which means that it is using both Windows Authentication and SQL Server Authentication.
|
|
# @see https://docs.microsoft.com/en-us/sql/t-sql/functions/serverproperty-transact-sql
|
|
if os.windows?
|
|
sql_windows_auth = mssql_session(user: 'sa', pass: 'Password12!', instance: 'SQL2012SP1')
|
|
describe sql_windows_auth.query("SELECT SERVERPROPERTY('IsIntegratedSecurityOnly') as \\\"login_mode\\\";").row(0).column('login_mode') do
|
|
its('value') { should_not be_empty }
|
|
its('value') { should cmp == 1 }
|
|
end
|
|
end
|