@@ -33,7 +33,6 @@ describe('PackerBuild Suite V1', function() {
3333 delete process . env [ "__packer_exists__" ] ;
3434 delete process . env [ "__packer_fix_fails__" ] ;
3535 delete process . env [ "__packer_validate_fails__" ] ;
36- delete process . env [ "__spnObjectId_not_exists__" ] ;
3736
3837 done ( ) ;
3938 } ) ;
@@ -56,7 +55,7 @@ describe('PackerBuild Suite V1', function() {
5655 it ( 'Writes packer var file successfully for windows template' , ( done :MochaDone ) => {
5756 let tp = path . join ( __dirname , 'L0Windows.js' ) ;
5857 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"}' ;
6059 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"}' ;
6160 tr . run ( ) ;
6261
@@ -120,7 +119,7 @@ describe('PackerBuild Suite V1', function() {
120119 let tp = path . join ( __dirname , 'L0WindowsCustomImage.js' ) ;
121120 let tr : ttm . MockTestRunner = new ttm . MockTestRunner ( tp ) ;
122121 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"}' ;
124123 tr . run ( ) ;
125124
126125 assert ( tr . invokedToolCount == 4 , 'should have invoked tool four times. actual: ' + tr . invokedToolCount ) ;
@@ -243,22 +242,6 @@ describe('PackerBuild Suite V1', function() {
243242 done ( ) ;
244243 } ) ;
245244
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-
262245 it ( 'Should cleanup temp template folder' , ( done :MochaDone ) => {
263246 let tp = path . join ( __dirname , 'L0Windows.js' ) ;
264247 let tr : ttm . MockTestRunner = new ttm . MockTestRunner ( tp ) ;
0 commit comments