8
8
# Covers testrail => ['89118', '89119', '89120', '89121', '89122', '89123', '89124', '89125', '89540']
9
9
describe "Test sqlserver::login" , :node => host do
10
10
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 |
13
13
expect ( r . stderr ) . not_to match ( /Error/i )
14
14
end
15
15
end
@@ -46,7 +46,7 @@ def remove_test_logins(host)
46
46
ensure => 'absent',
47
47
}
48
48
MANIFEST
49
- ensure_manifest_apply ( host , pp )
49
+ ensure_manifest_execute ( pp )
50
50
end
51
51
52
52
def create_login_manifest ( testcase , login_name , login_password , options = { } )
@@ -114,7 +114,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
114
114
ensure => 'present',
115
115
}
116
116
MANIFEST
117
- ensure_manifest_apply ( host , pp )
117
+ ensure_manifest_execute ( pp )
118
118
end
119
119
120
120
# Delete all test fixtures
@@ -137,7 +137,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
137
137
ensure => 'absent',
138
138
}
139
139
MANIFEST
140
- ensure_manifest_apply ( host , pp )
140
+ ensure_manifest_execute ( pp )
141
141
end
142
142
143
143
[ '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 = {})
163
163
164
164
it "can create a default #{ testcase } " do
165
165
pp = create_login_manifest ( testcase , @login_under_test , @login_passwd )
166
- ensure_manifest_apply ( host , pp )
166
+ ensure_manifest_execute ( pp )
167
167
end
168
168
169
169
it "should exist in the principals table" do
@@ -181,7 +181,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
181
181
182
182
it "is idempotent" do
183
183
pp = create_login_manifest ( testcase , @login_under_test , @login_passwd )
184
- ensure_manifest_apply ( host , pp )
184
+ ensure_manifest_execute ( pp )
185
185
end
186
186
end
187
187
@@ -192,7 +192,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
192
192
it "can create an #{ testcase } with 'check_expiration','check_policy' set" do
193
193
options = { 'check_expiration' => true , 'check_policy' => true }
194
194
pp = create_login_manifest ( testcase , @login_under_test , @login_passwd , options )
195
- ensure_manifest_apply ( host , pp )
195
+ ensure_manifest_execute ( pp )
196
196
end
197
197
198
198
it "should have is_expiration_checked set" do
@@ -212,7 +212,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
212
212
it "can create a #{ testcase } with 'default_database','default_language'" do
213
213
options = { 'default_database' => "#{ db_name } " , 'default_language' => 'Spanish' }
214
214
pp = create_login_manifest ( testcase , @login_under_test , @login_passwd , options )
215
- ensure_manifest_apply ( host , pp )
215
+ ensure_manifest_execute ( pp )
216
216
end
217
217
218
218
it "should exist in the principals table" do
@@ -237,7 +237,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
237
237
it "can create #{ testcase } with optional 'disabled'" do
238
238
options = { 'disabled' => true }
239
239
pp = create_login_manifest ( testcase , @login_under_test , @login_passwd , options )
240
- ensure_manifest_apply ( host , pp )
240
+ ensure_manifest_execute ( pp )
241
241
end
242
242
243
243
if testcase == 'WINDOWS_LOGIN group'
@@ -261,7 +261,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
261
261
it "should create an initial #{ testcase } " do
262
262
options = { 'svrroles' => '{\'sysadmin\' => 1}' }
263
263
pp = create_login_manifest ( testcase , @login_under_test , @login_passwd , options )
264
- ensure_manifest_apply ( host , pp )
264
+ ensure_manifest_execute ( pp )
265
265
end
266
266
267
267
it "should exist in the principals table on creation" do
@@ -272,7 +272,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
272
272
it "should modify a #{ testcase } login" do
273
273
options = { 'disabled' => true , 'default_database' => "#{ db_name } " , 'default_language' => 'Spanish' , 'check_expiration' => true , 'check_policy' => true , 'svrroles' => '{\'sysadmin\' => 1, \'serveradmin\' => 1}' }
274
274
pp = create_login_manifest ( testcase , @login_under_test , @login_passwd , options )
275
- ensure_manifest_apply ( host , pp )
275
+ ensure_manifest_execute ( pp )
276
276
end
277
277
278
278
if testcase == 'SQL_LOGIN user'
@@ -338,7 +338,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
338
338
339
339
it "should create an initial #{ testcase } " do
340
340
pp = create_login_manifest ( testcase , @login_under_test , @login_passwd )
341
- ensure_manifest_apply ( host , pp )
341
+ ensure_manifest_execute ( pp )
342
342
end
343
343
344
344
it "should exist in the principals table on creation" do
@@ -349,7 +349,7 @@ def create_login_manifest (testcase,login_name,login_password,options = {})
349
349
it "should remove a #{ testcase } on ensure => absent" do
350
350
options = { 'ensure' => 'absent' }
351
351
pp = create_login_manifest ( testcase , @login_under_test , @login_passwd , options )
352
- ensure_manifest_apply ( host , pp )
352
+ ensure_manifest_execute ( pp )
353
353
end
354
354
355
355
it "should not exist in the principals table after deletion" do
0 commit comments