88# Covers testrail => ['89118', '89119', '89120', '89121', '89122', '89123', '89124', '89125', '89540']
99describe "Test sqlserver::login" , :node => host do
1010
11- def ensure_manifest_apply ( host , pp )
12- apply_manifest_on ( host , pp ) do |r |
11+ def ensure_manifest_execute ( pp )
12+ execute_manifest ( pp ) do |r |
1313 expect ( r . stderr ) . not_to match ( /Error/i )
1414 end
1515 end
@@ -46,7 +46,7 @@ def remove_test_logins(host)
4646 ensure => 'absent',
4747 }
4848 MANIFEST
49- ensure_manifest_apply ( host , pp )
49+ ensure_manifest_execute ( pp )
5050 end
5151
5252 def create_login_manifest ( testcase , login_name , login_password , options = { } )
@@ -114,7 +114,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
114114 ensure => 'present',
115115 }
116116 MANIFEST
117- ensure_manifest_apply ( host , pp )
117+ ensure_manifest_execute ( pp )
118118 end
119119
120120 # Delete all test fixtures
@@ -137,7 +137,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
137137 ensure => 'absent',
138138 }
139139 MANIFEST
140- ensure_manifest_apply ( host , pp )
140+ ensure_manifest_execute ( pp )
141141 end
142142
143143 [ 'SQL_LOGIN user' , 'WINDOWS_LOGIN user' , 'WINDOWS_LOGIN group' ] . each do |testcase |
@@ -163,7 +163,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
163163
164164 it "can create a default #{ testcase } " do
165165 pp = create_login_manifest ( testcase , @login_under_test , @login_passwd )
166- ensure_manifest_apply ( host , pp )
166+ ensure_manifest_execute ( pp )
167167 end
168168
169169 it "should exist in the principals table" do
@@ -181,7 +181,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
181181
182182 it "is idempotent" do
183183 pp = create_login_manifest ( testcase , @login_under_test , @login_passwd )
184- ensure_manifest_apply ( host , pp )
184+ ensure_manifest_execute ( pp )
185185 end
186186 end
187187
@@ -192,7 +192,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
192192 it "can create an #{ testcase } with 'check_expiration','check_policy' set" do
193193 options = { 'check_expiration' => true , 'check_policy' => true }
194194 pp = create_login_manifest ( testcase , @login_under_test , @login_passwd , options )
195- ensure_manifest_apply ( host , pp )
195+ ensure_manifest_execute ( pp )
196196 end
197197
198198 it "should have is_expiration_checked set" do
@@ -212,7 +212,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
212212 it "can create a #{ testcase } with 'default_database','default_language'" do
213213 options = { 'default_database' => "#{ db_name } " , 'default_language' => 'Spanish' }
214214 pp = create_login_manifest ( testcase , @login_under_test , @login_passwd , options )
215- ensure_manifest_apply ( host , pp )
215+ ensure_manifest_execute ( pp )
216216 end
217217
218218 it "should exist in the principals table" do
@@ -237,7 +237,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
237237 it "can create #{ testcase } with optional 'disabled'" do
238238 options = { 'disabled' => true }
239239 pp = create_login_manifest ( testcase , @login_under_test , @login_passwd , options )
240- ensure_manifest_apply ( host , pp )
240+ ensure_manifest_execute ( pp )
241241 end
242242
243243 if testcase == 'WINDOWS_LOGIN group'
@@ -261,7 +261,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
261261 it "should create an initial #{ testcase } " do
262262 options = { 'svrroles' => '{\'sysadmin\' => 1}' }
263263 pp = create_login_manifest ( testcase , @login_under_test , @login_passwd , options )
264- ensure_manifest_apply ( host , pp )
264+ ensure_manifest_execute ( pp )
265265 end
266266
267267 it "should exist in the principals table on creation" do
@@ -272,7 +272,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
272272 it "should modify a #{ testcase } login" do
273273 options = { 'disabled' => true , 'default_database' => "#{ db_name } " , 'default_language' => 'Spanish' , 'check_expiration' => true , 'check_policy' => true , 'svrroles' => '{\'sysadmin\' => 1, \'serveradmin\' => 1}' }
274274 pp = create_login_manifest ( testcase , @login_under_test , @login_passwd , options )
275- ensure_manifest_apply ( host , pp )
275+ ensure_manifest_execute ( pp )
276276 end
277277
278278 if testcase == 'SQL_LOGIN user'
@@ -338,7 +338,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
338338
339339 it "should create an initial #{ testcase } " do
340340 pp = create_login_manifest ( testcase , @login_under_test , @login_passwd )
341- ensure_manifest_apply ( host , pp )
341+ ensure_manifest_execute ( pp )
342342 end
343343
344344 it "should exist in the principals table on creation" do
@@ -349,7 +349,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
349349 it "should remove a #{ testcase } on ensure => absent" do
350350 options = { 'ensure' => 'absent' }
351351 pp = create_login_manifest ( testcase , @login_under_test , @login_passwd , options )
352- ensure_manifest_apply ( host , pp )
352+ ensure_manifest_execute ( pp )
353353 end
354354
355355 it "should not exist in the principals table after deletion" do
0 commit comments