Skip to content

Commit 429374b

Browse files
author
Erick Banks
committed
(MAINT) add support for 2019 to test helpers
1 parent 693d33c commit 429374b

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

spec/acceptance/sqlserver_role_spec.rb

-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ def ensure_sqlserver_logins_users(db_name)
178178
type => 'DATABASE',
179179
}
180180
MANIFEST
181-
require 'pry'; binding.pry;
182181
execute_manifest(pp, opts = {}) do |r|
183182
expect(r.stderr).not_to match(/Error/i)
184183
end

spec/spec_helper_acceptance.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
WIN_ISO_ROOT = "https://artifactory.delivery.puppetlabs.net/artifactory/generic__iso/iso/windows"
1212
WIN_2012R2_ISO = "en_windows_server_2012_r2_with_update_x64_dvd_6052708.iso"
1313
QA_RESOURCE_ROOT = "https://artifactory.delivery.puppetlabs.net/artifactory/generic__iso/iso/SQLServer"
14-
SQL_2019_ISO = "SQLServer-2019-CTP2-x64-ENU.iso"
14+
SQL_2019_ISO = "SQLServer2019CTP2.4-x64-ENU.iso"
1515
SQL_2016_ISO = "en_sql_server_2016_enterprise_with_service_pack_1_x64_dvd_9542382.iso"
1616
SQL_2014_ISO = "SQLServer2014SP3-FullSlipstream-x64-ENU.iso"
1717
SQL_2012_ISO = "SQLServer2012SP1-FullSlipstream-ENU-x64.iso"

spec/sql_testing_helpers.rb

+8-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def run_sql_query(host, opts = {}, &block)
5656
$Env:Path +=\";C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\110\\Tools\\Binn;C:\\Program Files\\Microsoft SQL Server\\110\\Tools\\Binn\\"
5757
$Env:Path +=\";C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\120\\Tools\\Binn;C:\\Program Files\\Microsoft SQL Server\\120\\Tools\\Binn\\"
5858
$Env:Path +=\";C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\130\\Tools\\Binn;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\"
59+
$Env:Path +=\";C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\150\\Tools\\Binn;C:\\Program Files\\Microsoft SQL Server\\150\\Tools\\Binn\\"
5960
sqlcmd.exe -S #{server}\\#{instance} -U #{sql_admin_user} -P #{sql_admin_pass} -Q \"#{query}\"
6061
EOS
6162
# sqlcmd has problem authenticate to sqlserver if the instance is the default one MSSQLSERVER
@@ -103,6 +104,12 @@ def base_install(sql_version)
103104
:file => SQL_2016_ISO,
104105
:drive_letter => 'H'
105106
}
107+
when 2019
108+
iso_opts = {
109+
:folder => QA_RESOURCE_ROOT,
110+
:file => SQL_2019_ISO,
111+
:drive_letter => 'H'
112+
}
106113
end
107114
host = find_only_one('sql_host')
108115
# Mount the ISO on the agent
@@ -146,7 +153,7 @@ def remove_sql_instances(host, opts = {})
146153
end
147154

148155
def get_install_paths(version)
149-
vers = { '2012' => '110', '2014' => '120', '2016' => '130' }
156+
vers = { '2012' => '110', '2014' => '120', '2016' => '130', '2019' => '150' }
150157

151158
raise 'Valid version must be specified' if ! vers.keys.include?(version)
152159

0 commit comments

Comments
 (0)