@@ -405,26 +405,26 @@ func TestPlanParserParse(t *testing.T) {
405
405
name : "plan ok pattern" ,
406
406
body : planSuccessResult ,
407
407
result : ParseResult {
408
- Result : "Plan: 1 to add, 0 to change, 0 to destroy." ,
409
- HasAddOrUpdate : true ,
410
- HasDestroy : false ,
411
- HasNoChanges : false ,
412
- HasPlanError : false ,
413
- ExitCode : 0 ,
414
- Error : nil ,
408
+ Result : "Plan: 1 to add, 0 to change, 0 to destroy." ,
409
+ HasAddOrUpdateOnly : true ,
410
+ HasDestroy : false ,
411
+ HasNoChanges : false ,
412
+ HasPlanError : false ,
413
+ ExitCode : 0 ,
414
+ Error : nil ,
415
415
},
416
416
},
417
417
{
418
418
name : "no stdin" ,
419
419
body : "" ,
420
420
result : ParseResult {
421
- Result : "" ,
422
- HasAddOrUpdate : false ,
423
- HasDestroy : false ,
424
- HasNoChanges : false ,
425
- HasPlanError : false ,
426
- ExitCode : 1 ,
427
- Error : errors .New ("cannot parse plan result" ),
421
+ Result : "" ,
422
+ HasAddOrUpdateOnly : false ,
423
+ HasDestroy : false ,
424
+ HasNoChanges : false ,
425
+ HasPlanError : false ,
426
+ ExitCode : 1 ,
427
+ Error : errors .New ("cannot parse plan result" ),
428
428
},
429
429
},
430
430
{
@@ -437,64 +437,64 @@ func TestPlanParserParse(t *testing.T) {
437
437
438
438
* google_sql_database.main: google_sql_database.main: Error reading SQL Database "main" in instance "main-master-instance": googleapi: Error 409: The instance or operation is not in an appropriate state to handle the request., invalidState
439
439
* google_sql_user.proxyuser_main: 1 error(s) occurred:` ,
440
- HasAddOrUpdate : false ,
441
- HasDestroy : false ,
442
- HasNoChanges : false ,
443
- HasPlanError : true ,
444
- ExitCode : 1 ,
445
- Error : nil ,
440
+ HasAddOrUpdateOnly : false ,
441
+ HasDestroy : false ,
442
+ HasNoChanges : false ,
443
+ HasPlanError : true ,
444
+ ExitCode : 1 ,
445
+ Error : nil ,
446
446
},
447
447
},
448
448
{
449
449
name : "plan no changes" ,
450
450
body : planNoChanges ,
451
451
result : ParseResult {
452
- Result : "No changes. Infrastructure is up-to-date." ,
453
- HasAddOrUpdate : false ,
454
- HasDestroy : false ,
455
- HasNoChanges : true ,
456
- HasPlanError : false ,
457
- ExitCode : 0 ,
458
- Error : nil ,
452
+ Result : "No changes. Infrastructure is up-to-date." ,
453
+ HasAddOrUpdateOnly : false ,
454
+ HasDestroy : false ,
455
+ HasNoChanges : true ,
456
+ HasPlanError : false ,
457
+ ExitCode : 0 ,
458
+ Error : nil ,
459
459
},
460
460
},
461
461
{
462
462
name : "plan has destroy" ,
463
463
body : planHasDestroy ,
464
464
result : ParseResult {
465
- Result : "Plan: 0 to add, 0 to change, 1 to destroy." ,
466
- HasAddOrUpdate : false ,
467
- HasDestroy : true ,
468
- HasNoChanges : false ,
469
- HasPlanError : false ,
470
- ExitCode : 0 ,
471
- Error : nil ,
465
+ Result : "Plan: 0 to add, 0 to change, 1 to destroy." ,
466
+ HasAddOrUpdateOnly : false ,
467
+ HasDestroy : true ,
468
+ HasNoChanges : false ,
469
+ HasPlanError : false ,
470
+ ExitCode : 0 ,
471
+ Error : nil ,
472
472
},
473
473
},
474
474
{
475
475
name : "plan has add and destroy" ,
476
476
body : planHasAddAndDestroy ,
477
477
result : ParseResult {
478
- Result : "Plan: 1 to add, 0 to change, 1 to destroy." ,
479
- HasAddOrUpdate : false ,
480
- HasDestroy : true ,
481
- HasNoChanges : false ,
482
- HasPlanError : false ,
483
- ExitCode : 0 ,
484
- Error : nil ,
478
+ Result : "Plan: 1 to add, 0 to change, 1 to destroy." ,
479
+ HasAddOrUpdateOnly : false ,
480
+ HasDestroy : true ,
481
+ HasNoChanges : false ,
482
+ HasPlanError : false ,
483
+ ExitCode : 0 ,
484
+ Error : nil ,
485
485
},
486
486
},
487
487
{
488
488
name : "plan has add and update in place" ,
489
489
body : planHasAddAndUpdateInPlace ,
490
490
result : ParseResult {
491
- Result : "Plan: 1 to add, 1 to change, 0 to destroy." ,
492
- HasAddOrUpdate : true ,
493
- HasDestroy : false ,
494
- HasNoChanges : false ,
495
- HasPlanError : false ,
496
- ExitCode : 0 ,
497
- Error : nil ,
491
+ Result : "Plan: 1 to add, 1 to change, 0 to destroy." ,
492
+ HasAddOrUpdateOnly : true ,
493
+ HasDestroy : false ,
494
+ HasNoChanges : false ,
495
+ HasPlanError : false ,
496
+ ExitCode : 0 ,
497
+ Error : nil ,
498
498
},
499
499
},
500
500
}
0 commit comments