@@ -33,7 +33,6 @@ describe('PackerBuild Suite V1', function() {
33
33
delete process . env [ "__packer_exists__" ] ;
34
34
delete process . env [ "__packer_fix_fails__" ] ;
35
35
delete process . env [ "__packer_validate_fails__" ] ;
36
- delete process . env [ "__spnObjectId_not_exists__" ] ;
37
36
38
37
done ( ) ;
39
38
} ) ;
@@ -56,7 +55,7 @@ describe('PackerBuild Suite V1', function() {
56
55
it ( 'Writes packer var file successfully for windows template' , ( done :MochaDone ) => {
57
56
let tp = path . join ( __dirname , 'L0Windows.js' ) ;
58
57
let tr : ttm . MockTestRunner = new ttm . MockTestRunner ( tp ) ;
59
- let match1 = 'writing to file C:\\somefolder\\somevarfile.json content: {"subscription_id":"sId","client_id":"spId","client_secret":"spKey","tenant_id":"tenant","object_id":"oId" }' ;
58
+ let match1 = 'writing to file C:\\somefolder\\somevarfile.json content: {"subscription_id":"sId","client_id":"spId","client_secret":"spKey","tenant_id":"tenant"}' ;
60
59
let match2 = 'writing to file C:\\somefolder\\somevarfile.json content: {"resource_group":"testrg","storage_account":"teststorage","image_publisher":"MicrosoftWindowsServer","image_offer":"WindowsServer","image_sku":"2012-R2-Datacenter","location":"South India","capture_name_prefix":"Release-1","skip_clean":"true","script_relative_path":"dir3\\\\somedir\\\\deploy.ps1","package_path":"C:\\\\dir1\\\\somedir\\\\dir2","package_name":"dir2","script_arguments":"-target \\"subdir 1\\" -shouldFail false"}' ;
61
60
tr . run ( ) ;
62
61
@@ -120,7 +119,7 @@ describe('PackerBuild Suite V1', function() {
120
119
let tp = path . join ( __dirname , 'L0WindowsCustomImage.js' ) ;
121
120
let tr : ttm . MockTestRunner = new ttm . MockTestRunner ( tp ) ;
122
121
let match1 = 'writing to file C:\\somefolder\\somevarfile.json content: {"resource_group":"testrg","storage_account":"teststorage","image_url":"https://bishalpackerimages.blob.core.windows.net/system/Microsoft.Compute/Images/vsts-buildimagetask/Release-1-osDisk.2d175222-b257-405f-a07f-0af4dc4b3dc4.vhd","location":"South India","capture_name_prefix":"Release-1","skip_clean":"true","script_relative_path":"dir3\\\\somedir\\\\deploy.ps1","package_path":"C:\\\\dir1\\\\somedir\\\\dir2","package_name":"dir2","script_arguments":"-target \\"subdir 1\\" -shouldFail false"}' ;
123
- let match2 = 'writing to file C:\\somefolder\\somevarfile.json content: {"subscription_id":"sId","client_id":"spId","client_secret":"spKey","tenant_id":"tenant","object_id":"oId" }' ;
122
+ let match2 = 'writing to file C:\\somefolder\\somevarfile.json content: {"subscription_id":"sId","client_id":"spId","client_secret":"spKey","tenant_id":"tenant"}' ;
124
123
tr . run ( ) ;
125
124
126
125
assert ( tr . invokedToolCount == 4 , 'should have invoked tool four times. actual: ' + tr . invokedToolCount ) ;
@@ -243,22 +242,6 @@ describe('PackerBuild Suite V1', function() {
243
242
done ( ) ;
244
243
} ) ;
245
244
246
- it ( 'Should fetch SPN object id if service endpoint does not contain it' , ( done :MochaDone ) => {
247
- process . env [ "__spnObjectId_not_exists__" ] = "true" ;
248
- let tp = path . join ( __dirname , 'L0Windows.js' ) ;
249
- let tr : ttm . MockTestRunner = new ttm . MockTestRunner ( tp ) ;
250
- tr . run ( ) ;
251
- process . env [ "__spnObjectId_not_exists__" ] = "false" ;
252
-
253
- runValidations ( ( ) => {
254
- assert ( tr . invokedToolCount == 4 , 'should have invoked tool four times. actual: ' + tr . invokedToolCount ) ;
255
- assert ( tr . succeeded , 'task should have succeeded' ) ;
256
- assert ( tr . stdout . indexOf ( "loc_mock_FetchingSPNDetailsRemotely" ) != - 1 , "SPN object should be fetched" ) ;
257
- assert ( tr . stdout . indexOf ( "loc_mock_FetchedSPNDetailsRemotely" ) != - 1 , "SPN object should be fetched" ) ;
258
- } , tr , done ) ;
259
-
260
- } ) ;
261
-
262
245
it ( 'Should cleanup temp template folder' , ( done :MochaDone ) => {
263
246
let tp = path . join ( __dirname , 'L0Windows.js' ) ;
264
247
let tr : ttm . MockTestRunner = new ttm . MockTestRunner ( tp ) ;
0 commit comments