Skip to content

Commit 51032d7

Browse files
committed
Revert "no message"
This reverts commit b2cb8de.
1 parent b2cb8de commit 51032d7

File tree

1 file changed

+31
-13
lines changed

1 file changed

+31
-13
lines changed

spec/spec_helper_acceptance_local.rb

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ class Helper
2929

3030
if ENV['GITHUB_ACTIONS'] == 'true'
3131
Helper.instance.run_shell("gsutil -q cp -r gs://artifactory-modules/puppetlabs-sqlserver/#{WIN_2012R2_ISO} C:/Windows/Temp/#{WIN_2012R2_ISO}")
32-
iso_opts = {
33-
folder: 'C:/Windows/Temp',
34-
file: WIN_2012R2_ISO,
35-
drive_letter: 'I',
36-
}
37-
mount_iso(iso_opts)
32+
# iso_opts = {
33+
# folder: 'C:/Windows/Temp',
34+
# file: WIN_2012R2_ISO,
35+
# drive_letter: 'I',
36+
# }
37+
# mount_iso(iso_opts)
3838

3939
# Temp fix to prove code works
4040
base_install('2016', 'C:/Windows/Temp')
@@ -105,48 +105,61 @@ def mount_iso(opts = {})
105105
end
106106

107107
def base_install(sql_version, resource_root)
108+
i_iso_opts = {
109+
folder: 'C:/Windows/Temp',
110+
file: WIN_2012R2_ISO,
111+
drive_letter: 'I',
112+
}
113+
mount_iso(i_iso_opts)
114+
108115
case sql_version.to_i
109116
when 2012
110117
Helper.instance.run_shell("gsutil -q cp -r gs://artifactory-modules/puppetlabs-sqlserver/#{SQL_2012_ISO} C:/Windows/Temp/#{SQL_2012_ISO}") if ENV['GITHUB_ACTIONS'] == 'true'
111-
iso_opts = {
118+
h_iso_opts = {
112119
folder: resource_root,
113120
file: SQL_2012_ISO,
114121
drive_letter: 'H',
115122
}
116123
when 2014
117124
Helper.instance.run_shell("gsutil -q cp -r gs://artifactory-modules/puppetlabs-sqlserver/#{SQL_2014_ISO} C:/Windows/Temp/#{SQL_2014_ISO}") if ENV['GITHUB_ACTIONS'] == 'true'
118-
iso_opts = {
125+
h_iso_opts = {
119126
folder: resource_root,
120127
file: SQL_2014_ISO,
121128
drive_letter: 'H',
122129
}
123130
when 2016
124131
Helper.instance.run_shell("gsutil -q cp -r gs://artifactory-modules/puppetlabs-sqlserver/#{SQL_2016_ISO} C:/Windows/Temp/#{SQL_2016_ISO}") if ENV['GITHUB_ACTIONS'] == 'true'
125-
iso_opts = {
132+
h_iso_opts = {
126133
folder: resource_root,
127134
file: SQL_2016_ISO,
128135
drive_letter: 'H',
129136
}
130137
when 2017
131138
Helper.instance.run_shell("gsutil -q cp -r gs://artifactory-modules/puppetlabs-sqlserver/#{SQL_2017_ISO} C:/Windows/Temp/#{SQL_2017_ISO}") if ENV['GITHUB_ACTIONS'] == 'true'
132-
iso_opts = {
139+
h_iso_opts = {
133140
folder: resource_root,
134141
file: SQL_2017_ISO,
135142
drive_letter: 'H',
136143
}
137144
when 2019
138145
Helper.instance.run_shell("gsutil -q cp -r gs://artifactory-modules/puppetlabs-sqlserver/#{SQL_2019_ISO} C:/Windows/Temp/#{SQL_2019_ISO}") if ENV['GITHUB_ACTIONS'] == 'true'
139-
iso_opts = {
146+
h_iso_opts = {
140147
folder: resource_root,
141148
file: SQL_2019_ISO,
142149
drive_letter: 'H',
143150
}
144151
end
145152
# Mount the ISO on the agent
146-
mount_iso(iso_opts)
153+
mount_iso(h_iso_opts)
147154
# Install Microsoft SQL on the agent before running any tests
148155
features = ['DQ', 'FullText', 'Replication', 'SQLEngine']
149156
install_sqlserver(features)
157+
158+
reboot()
159+
# Remount the ISO on the agent
160+
mount_iso(i_iso_opts)
161+
mount_iso(h_iso_opts)
162+
install_sqlserver(features)
150163
end
151164

152165
def install_sqlserver(features)
@@ -170,7 +183,12 @@ def install_sqlserver(features)
170183
windows_feature_source => 'I:\\sources\\sxs',
171184
}
172185
MANIFEST
173-
Helper.instance.apply_manifest(pp, catch_failures: true)
186+
Helper.instance.apply_manifest(pp)
187+
end
188+
189+
def reboot()
190+
# Call the reboot plan
191+
system("bundle exec bolt --modulepath ./spec/fixtures/modules/ -i spec/fixtures/litmus_inventory.yaml plan run reboot targets='#{ENV['TARGET_HOST']}' reconnect_timeout=300")
174192
end
175193

176194
def run_sql_query(opts = {}, &block)

0 commit comments

Comments
 (0)