github.com/Thanhphan1147/cloudfoundry-cli@v7.1.0+incompatible/actor/pushaction/merge_and_validate_settings_and_manifest_test.go (about) 1 package pushaction_test 2 3 import ( 4 "io/ioutil" 5 "os" 6 7 "code.cloudfoundry.org/cli/actor/actionerror" 8 . "code.cloudfoundry.org/cli/actor/pushaction" 9 "code.cloudfoundry.org/cli/types" 10 "code.cloudfoundry.org/cli/util/manifest" 11 . "github.com/onsi/ginkgo" 12 . "github.com/onsi/ginkgo/extensions/table" 13 . "github.com/onsi/gomega" 14 ) 15 16 var _ = Describe("MergeAndValidateSettingsAndManifest", func() { 17 var ( 18 actor *Actor 19 cmdSettings CommandLineSettings 20 21 currentDirectory string 22 ) 23 24 BeforeEach(func() { 25 actor, _, _, _ = getTestPushActor() 26 currentDirectory = getCurrentDir() 27 }) 28 29 When("only passed command line settings", func() { 30 BeforeEach(func() { 31 cmdSettings = CommandLineSettings{ 32 CurrentDirectory: currentDirectory, 33 DockerImage: "some-image", 34 Name: "some-app", 35 } 36 }) 37 38 It("returns a manifest made from the command line settings", func() { 39 manifests, err := actor.MergeAndValidateSettingsAndManifests(cmdSettings, nil) 40 Expect(err).ToNot(HaveOccurred()) 41 Expect(manifests).To(Equal([]manifest.Application{{ 42 DockerImage: "some-image", 43 Name: "some-app", 44 }})) 45 }) 46 }) 47 48 When("passed command line settings and a single manifest application", func() { 49 var ( 50 apps []manifest.Application 51 mergedApps []manifest.Application 52 executeErr error 53 ) 54 55 BeforeEach(func() { 56 cmdSettings = CommandLineSettings{ 57 CurrentDirectory: currentDirectory, 58 Name: "steve", 59 } 60 61 apps = []manifest.Application{ 62 { 63 Name: "app-1", 64 Routes: []string{"google.com"}, 65 }, 66 } 67 }) 68 69 JustBeforeEach(func() { 70 mergedApps, executeErr = actor.MergeAndValidateSettingsAndManifests(cmdSettings, apps) 71 }) 72 73 It("merges command line settings and manifest apps", func() { 74 Expect(executeErr).ToNot(HaveOccurred()) 75 76 Expect(mergedApps).To(ConsistOf( 77 manifest.Application{ 78 Name: "steve", 79 Path: currentDirectory, 80 Routes: []string{"google.com"}, 81 }, 82 )) 83 }) 84 85 When("hostname is specified on the command-line and random-route in the manifest", func() { 86 BeforeEach(func() { 87 cmdSettings = CommandLineSettings{ 88 CurrentDirectory: currentDirectory, 89 DefaultRouteDomain: "shopforstuff.com", 90 DefaultRouteHostname: "scott", 91 Name: "spork6", 92 } 93 94 apps = []manifest.Application{ 95 { 96 Name: "spork6", 97 RandomRoute: true, 98 }, 99 } 100 }) 101 102 It("the random-route part is ignored", func() { 103 104 Expect(executeErr).ToNot(HaveOccurred()) 105 106 Expect(mergedApps).To(ConsistOf( 107 manifest.Application{ 108 Name: "spork6", 109 Path: currentDirectory, 110 Domain: "shopforstuff.com", 111 Hostname: "scott", 112 RandomRoute: false, 113 }, 114 )) 115 }) 116 }) 117 }) 118 119 When("passed command line settings and multiple manifest applications", func() { 120 var ( 121 apps []manifest.Application 122 mergedApps []manifest.Application 123 executeErr error 124 ) 125 126 BeforeEach(func() { 127 cmdSettings = CommandLineSettings{ 128 CurrentDirectory: currentDirectory, 129 } 130 131 apps = []manifest.Application{ 132 {Name: "app-1"}, 133 {Name: "app-2"}, 134 } 135 }) 136 137 JustBeforeEach(func() { 138 mergedApps, executeErr = actor.MergeAndValidateSettingsAndManifests(cmdSettings, apps) 139 }) 140 141 It("merges command line settings and manifest apps", func() { 142 Expect(executeErr).ToNot(HaveOccurred()) 143 144 Expect(mergedApps).To(ConsistOf( 145 manifest.Application{ 146 Name: "app-1", 147 Path: currentDirectory, 148 }, 149 manifest.Application{ 150 Name: "app-2", 151 Path: currentDirectory, 152 }, 153 )) 154 }) 155 156 When("CommandLineSettings specify an app in the manifests", func() { 157 When("the app exists in the manifest", func() { 158 BeforeEach(func() { 159 cmdSettings.Name = "app-1" 160 }) 161 162 It("returns just the specified app manifest", func() { 163 Expect(executeErr).ToNot(HaveOccurred()) 164 165 Expect(mergedApps).To(ConsistOf( 166 manifest.Application{ 167 Name: "app-1", 168 Path: currentDirectory, 169 }, 170 )) 171 }) 172 }) 173 174 When("the app does *not* exist in the manifest", func() { 175 BeforeEach(func() { 176 cmdSettings.Name = "app-4" 177 }) 178 179 It("returns just the specified app manifest", func() { 180 Expect(executeErr).To(MatchError(actionerror.AppNotFoundInManifestError{Name: "app-4"})) 181 }) 182 }) 183 }) 184 }) 185 186 Describe("defaulting values", func() { 187 var ( 188 apps []manifest.Application 189 mergedApps []manifest.Application 190 executeErr error 191 ) 192 193 BeforeEach(func() { 194 cmdSettings = CommandLineSettings{ 195 CurrentDirectory: currentDirectory, 196 } 197 198 apps = []manifest.Application{ 199 {Name: "app-1"}, 200 {Name: "app-2"}, 201 } 202 }) 203 204 JustBeforeEach(func() { 205 mergedApps, executeErr = actor.MergeAndValidateSettingsAndManifests(cmdSettings, apps) 206 }) 207 208 When("HealthCheckType is set to http and no endpoint is set", func() { 209 BeforeEach(func() { 210 apps[0].HealthCheckType = "http" 211 apps[1].HealthCheckType = "http" 212 apps[1].HealthCheckHTTPEndpoint = "/banana" 213 }) 214 215 It("sets health-check-http-endpoint to '/'", func() { 216 Expect(executeErr).ToNot(HaveOccurred()) 217 Expect(mergedApps[0].HealthCheckHTTPEndpoint).To(Equal("/")) 218 Expect(mergedApps[1].HealthCheckHTTPEndpoint).To(Equal("/banana")) 219 }) 220 }) 221 }) 222 223 Describe("sanitizing values", func() { 224 var ( 225 tempDir string 226 227 apps []manifest.Application 228 mergedApps []manifest.Application 229 executeErr error 230 ) 231 232 BeforeEach(func() { 233 cmdSettings = CommandLineSettings{ 234 CurrentDirectory: currentDirectory, 235 } 236 237 apps = []manifest.Application{ 238 {Name: "app-1"}, 239 } 240 241 var err error 242 tempDir, err = ioutil.TempDir("", "merge-push-settings-") 243 Expect(err).ToNot(HaveOccurred()) 244 }) 245 246 AfterEach(func() { 247 Expect(os.RemoveAll(tempDir)).ToNot(HaveOccurred()) 248 }) 249 250 JustBeforeEach(func() { 251 mergedApps, executeErr = actor.MergeAndValidateSettingsAndManifests(cmdSettings, apps) 252 }) 253 254 When("app path is set from the command line", func() { 255 BeforeEach(func() { 256 cmdSettings.ProvidedAppPath = tempDir 257 }) 258 259 It("sets the app path to the provided path", func() { 260 Expect(executeErr).ToNot(HaveOccurred()) 261 Expect(mergedApps[0].Path).To(Equal(tempDir)) 262 }) 263 }) 264 265 When("app path is set from the manifest", func() { 266 BeforeEach(func() { 267 apps[0].Path = tempDir 268 }) 269 270 It("sets the app path to the provided path", func() { 271 Expect(executeErr).ToNot(HaveOccurred()) 272 Expect(mergedApps[0].Path).To(Equal(tempDir)) 273 }) 274 }) 275 }) 276 277 const RealPath = "some-real-path" 278 279 manifestWithMultipleApps := []manifest.Application{ 280 {Name: "some-name-1"}, 281 {Name: "some-name-2"}, 282 } 283 284 DescribeTable("valid manifest settings", 285 func(settings CommandLineSettings, apps []manifest.Application, expectedErr error) { 286 currentDirectory, err := os.Getwd() 287 Expect(err).ToNot(HaveOccurred()) 288 289 if settings.ProvidedAppPath == RealPath { 290 settings.ProvidedAppPath = currentDirectory 291 } 292 293 for i, app := range apps { 294 if app.Path == RealPath { 295 apps[i].Path = currentDirectory 296 } 297 } 298 299 _, err = actor.MergeAndValidateSettingsAndManifests(settings, apps) 300 Expect(err).ToNot(HaveOccurred()) 301 }, 302 303 Entry("valid route with a port", 304 CommandLineSettings{}, 305 []manifest.Application{{ 306 Name: "some-name-1", 307 Path: RealPath, 308 Routes: []string{"www.hardknox.cli.fun:1234"}, 309 }}, 310 nil), 311 312 Entry("valid route with crazy characters", 313 CommandLineSettings{}, 314 []manifest.Application{{ 315 Name: "some-name-1", 316 Path: RealPath, 317 Routes: []string{"www.hardknox.cli.fun/foo_1+2.html"}, 318 }}, 319 nil), 320 321 Entry("ValidRoute with a star", 322 CommandLineSettings{}, 323 []manifest.Application{{ 324 Name: "some-name-1", 325 Path: RealPath, 326 Routes: []string{"*.hardknox.cli.fun"}, 327 }}, 328 nil), 329 ) 330 331 DescribeTable("command line settings and manifest combination validation errors", 332 func(settings CommandLineSettings, apps []manifest.Application, expectedErr error) { 333 currentDirectory, err := os.Getwd() 334 Expect(err).ToNot(HaveOccurred()) 335 336 if settings.ProvidedAppPath == RealPath { 337 settings.ProvidedAppPath = currentDirectory 338 } 339 340 for i, app := range apps { 341 if app.Path == RealPath { 342 apps[i].Path = currentDirectory 343 } 344 } 345 346 _, err = actor.MergeAndValidateSettingsAndManifests(settings, apps) 347 Expect(err).To(MatchError(expectedErr)) 348 }, 349 350 Entry("CommandLineOptionsWithMultipleAppsError", 351 CommandLineSettings{ 352 Buildpacks: []string{"some-buildpack"}, 353 }, 354 manifestWithMultipleApps, 355 actionerror.CommandLineOptionsWithMultipleAppsError{}), 356 Entry("CommandLineOptionsWithMultipleAppsError", 357 CommandLineSettings{ 358 Command: types.FilteredString{IsSet: true}, 359 }, 360 manifestWithMultipleApps, 361 actionerror.CommandLineOptionsWithMultipleAppsError{}), 362 Entry("CommandLineOptionsWithMultipleAppsError", 363 CommandLineSettings{ 364 DiskQuota: 4, 365 }, 366 manifestWithMultipleApps, 367 actionerror.CommandLineOptionsWithMultipleAppsError{}), 368 Entry("CommandLineOptionsWithMultipleAppsError", 369 CommandLineSettings{ 370 DefaultRouteDomain: "some-domain", 371 }, 372 manifestWithMultipleApps, 373 actionerror.CommandLineOptionsWithMultipleAppsError{}), 374 Entry("CommandLineOptionsWithMultipleAppsError", 375 CommandLineSettings{ 376 DockerImage: "some-docker-image", 377 }, 378 manifestWithMultipleApps, 379 actionerror.CommandLineOptionsWithMultipleAppsError{}), 380 Entry("CommandLineOptionsWithMultipleAppsError", 381 CommandLineSettings{ 382 DockerUsername: "some-docker-username", 383 }, 384 manifestWithMultipleApps, 385 actionerror.CommandLineOptionsWithMultipleAppsError{}), 386 Entry("CommandLineOptionsWithMultipleAppsError", 387 CommandLineSettings{ 388 HealthCheckTimeout: 4, 389 }, 390 manifestWithMultipleApps, 391 actionerror.CommandLineOptionsWithMultipleAppsError{}), 392 Entry("CommandLineOptionsWithMultipleAppsError", 393 CommandLineSettings{ 394 HealthCheckType: "http", 395 }, 396 manifestWithMultipleApps, 397 actionerror.CommandLineOptionsWithMultipleAppsError{}), 398 Entry("CommandLineOptionsWithMultipleAppsError", 399 CommandLineSettings{ 400 DefaultRouteHostname: "some-hostname", 401 }, 402 manifestWithMultipleApps, 403 actionerror.CommandLineOptionsWithMultipleAppsError{}), 404 Entry("CommandLineOptionsWithMultipleAppsError", 405 CommandLineSettings{ 406 Instances: types.NullInt{IsSet: true}, 407 }, 408 manifestWithMultipleApps, 409 actionerror.CommandLineOptionsWithMultipleAppsError{}), 410 Entry("CommandLineOptionsWithMultipleAppsError", 411 CommandLineSettings{ 412 Memory: 4, 413 }, 414 manifestWithMultipleApps, 415 actionerror.CommandLineOptionsWithMultipleAppsError{}), 416 Entry("CommandLineOptionsWithMultipleAppsError", 417 CommandLineSettings{ 418 ProvidedAppPath: "some-path", 419 }, 420 manifestWithMultipleApps, 421 actionerror.CommandLineOptionsWithMultipleAppsError{}), 422 423 Entry("CommandLineOptionsWithMultipleAppsError", 424 CommandLineSettings{ 425 NoHostname: true, 426 }, 427 manifestWithMultipleApps, 428 actionerror.CommandLineOptionsWithMultipleAppsError{}), 429 Entry("CommandLineOptionsWithMultipleAppsError", 430 CommandLineSettings{ 431 NoRoute: true, 432 }, 433 manifestWithMultipleApps, 434 actionerror.CommandLineOptionsWithMultipleAppsError{}), 435 Entry("CommandLineOptionsWithMultipleAppsError", 436 CommandLineSettings{ 437 ProvidedAppPath: "some-app-path", 438 }, 439 manifestWithMultipleApps, 440 actionerror.CommandLineOptionsWithMultipleAppsError{}), 441 Entry("CommandLineOptionsWithMultipleAppsError", 442 CommandLineSettings{ 443 RandomRoute: true, 444 }, 445 manifestWithMultipleApps, 446 actionerror.CommandLineOptionsWithMultipleAppsError{}), 447 Entry("CommandLineOptionsWithMultipleAppsError", 448 CommandLineSettings{ 449 RoutePath: "some-route-path", 450 }, 451 manifestWithMultipleApps, 452 actionerror.CommandLineOptionsWithMultipleAppsError{}), 453 454 Entry("CommandLineOptionsWithMultipleAppsError", 455 CommandLineSettings{ 456 StackName: "some-stackname", 457 }, 458 manifestWithMultipleApps, 459 actionerror.CommandLineOptionsWithMultipleAppsError{}), 460 461 Entry("PropertyCombinationError", 462 CommandLineSettings{}, 463 []manifest.Application{{ 464 Name: "some-name-1", 465 Routes: []string{"some-route"}, 466 NoRoute: true, 467 Path: RealPath, 468 }}, 469 actionerror.PropertyCombinationError{ 470 AppName: "some-name-1", 471 Properties: []string{"no-route", "routes"}, 472 }), 473 474 Entry("TriggerLegacyPushError", 475 CommandLineSettings{}, 476 []manifest.Application{{DeprecatedDomain: true}}, 477 actionerror.TriggerLegacyPushError{DomainHostRelated: []string{"domain"}}), 478 479 Entry("TriggerLegacyPushError", 480 CommandLineSettings{}, 481 []manifest.Application{{DeprecatedDomains: true}}, 482 actionerror.TriggerLegacyPushError{DomainHostRelated: []string{"domains"}}), 483 484 Entry("TriggerLegacyPushError", 485 CommandLineSettings{}, 486 []manifest.Application{{DeprecatedHost: true}}, 487 actionerror.TriggerLegacyPushError{DomainHostRelated: []string{"host"}}), 488 489 Entry("TriggerLegacyPushError", 490 CommandLineSettings{}, 491 []manifest.Application{{DeprecatedHosts: true}}, 492 actionerror.TriggerLegacyPushError{DomainHostRelated: []string{"hosts"}}), 493 494 Entry("TriggerLegacyPushError", 495 CommandLineSettings{}, 496 []manifest.Application{{DeprecatedNoHostname: true}}, 497 actionerror.TriggerLegacyPushError{DomainHostRelated: []string{"no-hostname"}}), 498 499 Entry("CommmandLineOptionsAndManifestConflictError", 500 CommandLineSettings{ 501 DefaultRouteDomain: "some-domain", 502 }, 503 []manifest.Application{{ 504 Routes: []string{"some-route-1", "some-route-2"}, 505 }}, 506 actionerror.CommandLineOptionsAndManifestConflictError{ 507 ManifestAttribute: "route", 508 CommandLineOptions: []string{"-d", "--hostname", "-n", "--no-hostname", "--route-path"}, 509 }, 510 ), 511 Entry("CommmandLineOptionsAndManifestConflictError", 512 CommandLineSettings{ 513 DefaultRouteHostname: "some-hostname", 514 }, 515 []manifest.Application{{ 516 Routes: []string{"some-route-1", "some-route-2"}, 517 }}, 518 actionerror.CommandLineOptionsAndManifestConflictError{ 519 ManifestAttribute: "route", 520 CommandLineOptions: []string{"-d", "--hostname", "-n", "--no-hostname", "--route-path"}, 521 }, 522 ), 523 Entry("CommmandLineOptionsAndManifestConflictError", 524 CommandLineSettings{ 525 NoHostname: true, 526 }, 527 []manifest.Application{{ 528 Routes: []string{"some-route-1", "some-route-2"}, 529 }}, 530 actionerror.CommandLineOptionsAndManifestConflictError{ 531 ManifestAttribute: "route", 532 CommandLineOptions: []string{"-d", "--hostname", "-n", "--no-hostname", "--route-path"}, 533 }, 534 ), 535 Entry("CommmandLineOptionsAndManifestConflictError", 536 CommandLineSettings{ 537 RoutePath: "some-route", 538 }, 539 []manifest.Application{{ 540 Routes: []string{"some-route-1", "some-route-2"}, 541 }}, 542 actionerror.CommandLineOptionsAndManifestConflictError{ 543 ManifestAttribute: "route", 544 CommandLineOptions: []string{"-d", "--hostname", "-n", "--no-hostname", "--route-path"}, 545 }, 546 ), 547 ) 548 549 DescribeTable("post merge validation errors", 550 func(settings CommandLineSettings, apps []manifest.Application, expectedErr error) { 551 currentDirectory, err := os.Getwd() 552 Expect(err).ToNot(HaveOccurred()) 553 554 if settings.ProvidedAppPath == RealPath { 555 settings.ProvidedAppPath = currentDirectory 556 } 557 558 for i, app := range apps { 559 if app.Path == RealPath { 560 apps[i].Path = currentDirectory 561 } 562 } 563 564 _, err = actor.MergeAndValidateSettingsAndManifests(settings, apps) 565 Expect(err).To(MatchError(expectedErr)) 566 }, 567 568 Entry("MissingNameError", CommandLineSettings{}, nil, actionerror.MissingNameError{}), 569 Entry("MissingNameError", CommandLineSettings{}, []manifest.Application{{}}, actionerror.MissingNameError{}), 570 571 Entry("InvalidRoute", 572 CommandLineSettings{}, 573 []manifest.Application{{ 574 Name: "some-name-1", 575 Path: RealPath, 576 Routes: []string{"http:/www.hardknox.com"}, 577 }}, 578 actionerror.InvalidRouteError{Route: "http:/www.hardknox.com"}), 579 580 Entry("InvalidRoute", 581 CommandLineSettings{}, 582 []manifest.Application{{ 583 Name: "some-name-1", 584 Path: RealPath, 585 Routes: []string{"I R ROUTE"}, 586 }}, 587 actionerror.InvalidRouteError{Route: "I R ROUTE"}), 588 589 Entry("InvalidRoute", 590 CommandLineSettings{}, 591 []manifest.Application{{ 592 Name: "some-name-1", 593 Path: RealPath, 594 Routes: []string{"potato"}, 595 }}, 596 actionerror.InvalidRouteError{Route: "potato"}), 597 598 Entry("DockerPasswordNotSetError", 599 CommandLineSettings{}, 600 []manifest.Application{{ 601 Name: "some-name-1", 602 DockerImage: "some-image", 603 DockerUsername: "some-username", 604 }}, 605 actionerror.DockerPasswordNotSetError{}), 606 607 // NonexistentAppPathError found in 608 // merge_and_validate_settings_and_manifest_unix_test.go and 609 // merge_and_validate_settings_and_manifest_windows_test.go 610 611 Entry("PropertyCombinationError", 612 CommandLineSettings{ 613 DropletPath: "some-droplet", 614 }, 615 []manifest.Application{{ 616 Name: "some-name-1", 617 DockerImage: "some-image", 618 }}, 619 actionerror.PropertyCombinationError{ 620 AppName: "some-name-1", 621 Properties: []string{"docker", "droplet"}, 622 }), 623 Entry("PropertyCombinationError", 624 CommandLineSettings{ 625 DropletPath: "some-droplet", 626 }, 627 []manifest.Application{{ 628 Name: "some-name-1", 629 Path: "some-path", 630 }}, 631 actionerror.PropertyCombinationError{ 632 AppName: "some-name-1", 633 Properties: []string{"droplet", "path"}, 634 }), 635 Entry("PropertyCombinationError", 636 CommandLineSettings{}, 637 []manifest.Application{{ 638 Name: "some-name-1", 639 DockerImage: "some-image", 640 Buildpack: types.FilteredString{IsSet: true}, 641 }}, 642 actionerror.PropertyCombinationError{ 643 AppName: "some-name-1", 644 Properties: []string{"docker", "buildpack"}, 645 }), 646 Entry("PropertyCombinationError", 647 CommandLineSettings{}, 648 []manifest.Application{{ 649 Name: "some-name-1", 650 DockerImage: "some-image", 651 Path: "some-path", 652 }}, 653 actionerror.PropertyCombinationError{ 654 AppName: "some-name-1", 655 Properties: []string{"docker", "path"}, 656 }), 657 Entry("PropertyCombinationError", 658 CommandLineSettings{ 659 NoHostname: true, 660 }, 661 []manifest.Application{{ 662 NoRoute: true, 663 Name: "some-name-1", 664 DockerImage: "some-docker-image", 665 }}, 666 actionerror.PropertyCombinationError{ 667 AppName: "some-name-1", 668 Properties: []string{"no-hostname", "no-route"}, 669 }), 670 Entry("PropertyCombinationError", 671 CommandLineSettings{ 672 DefaultRouteHostname: "potato", 673 }, 674 []manifest.Application{{ 675 NoRoute: true, 676 Name: "some-name-1", 677 DockerImage: "some-docker-image", 678 }}, 679 actionerror.PropertyCombinationError{ 680 AppName: "some-name-1", 681 Properties: []string{"hostname", "no-route"}, 682 }), 683 Entry("PropertyCombinationError", 684 CommandLineSettings{ 685 RoutePath: "some-path", 686 }, 687 []manifest.Application{{ 688 NoRoute: true, 689 Name: "some-name-1", 690 DockerImage: "some-docker-image", 691 }}, 692 actionerror.PropertyCombinationError{ 693 AppName: "some-name-1", 694 Properties: []string{"route-path", "no-route"}, 695 }), 696 Entry("PropertyCombinationError", 697 CommandLineSettings{}, 698 []manifest.Application{{ 699 Name: "some-name-1", 700 Path: RealPath, 701 Buildpack: types.FilteredString{Value: "some-buildpack", IsSet: true}, 702 Buildpacks: []string{}, 703 }}, 704 actionerror.PropertyCombinationError{ 705 AppName: "some-name-1", 706 Properties: []string{"buildpack", "buildpacks"}, 707 }, 708 ), 709 Entry("PropertyCombinationError", 710 CommandLineSettings{}, 711 []manifest.Application{{ 712 Name: "some-name-1", 713 DockerImage: "some-docker-image", 714 Buildpacks: []string{}, 715 }}, 716 actionerror.PropertyCombinationError{ 717 AppName: "some-name-1", 718 Properties: []string{"docker", "buildpacks"}, 719 }, 720 ), 721 Entry("PropertyCombinationError", 722 CommandLineSettings{ 723 DropletPath: "some-droplet", 724 }, 725 []manifest.Application{{ 726 Name: "some-name-1", 727 Buildpacks: []string{}, 728 }}, 729 actionerror.PropertyCombinationError{ 730 AppName: "some-name-1", 731 Properties: []string{"droplet", "buildpacks"}, 732 }, 733 ), 734 Entry("PropertyCombinationError", 735 CommandLineSettings{ 736 DropletPath: "some-droplet", 737 }, 738 []manifest.Application{{ 739 Name: "some-name-1", 740 Buildpack: types.FilteredString{Value: "some-buildpack", IsSet: true}, 741 }}, 742 actionerror.PropertyCombinationError{ 743 AppName: "some-name-1", 744 Properties: []string{"droplet", "buildpack"}, 745 }, 746 ), 747 Entry("HTTPHealthCheckInvalidError", 748 CommandLineSettings{ 749 HealthCheckType: "port", 750 }, 751 []manifest.Application{{ 752 Name: "some-name-1", 753 HealthCheckHTTPEndpoint: "/some/endpoint", 754 Path: RealPath, 755 }}, 756 actionerror.HTTPHealthCheckInvalidError{}), 757 Entry("HTTPHealthCheckInvalidError", 758 CommandLineSettings{}, 759 []manifest.Application{{ 760 Name: "some-name-1", 761 HealthCheckType: "port", 762 HealthCheckHTTPEndpoint: "/some/endpoint", 763 Path: RealPath, 764 }}, 765 actionerror.HTTPHealthCheckInvalidError{}), 766 Entry("HTTPHealthCheckInvalidError", 767 CommandLineSettings{ 768 HealthCheckType: "process", 769 }, 770 []manifest.Application{{ 771 Name: "some-name-1", 772 HealthCheckHTTPEndpoint: "/some/endpoint", 773 Path: RealPath, 774 }}, 775 actionerror.HTTPHealthCheckInvalidError{}), 776 Entry("HTTPHealthCheckInvalidError", 777 CommandLineSettings{}, 778 []manifest.Application{{ 779 Name: "some-name-1", 780 HealthCheckType: "process", 781 HealthCheckHTTPEndpoint: "/some/endpoint", 782 Path: RealPath, 783 }}, 784 actionerror.HTTPHealthCheckInvalidError{}), 785 Entry("HTTPHealthCheckInvalidError", 786 CommandLineSettings{}, 787 []manifest.Application{{ 788 Name: "some-name-1", 789 HealthCheckHTTPEndpoint: "/some/endpoint", 790 Path: RealPath, 791 }}, 792 actionerror.HTTPHealthCheckInvalidError{}), 793 Entry("InvalidBuildpacksError", 794 CommandLineSettings{ 795 Buildpacks: []string{"null", "some-buildpack"}, 796 }, 797 []manifest.Application{{ 798 Name: "some-name-1", 799 Path: RealPath, 800 }}, 801 actionerror.InvalidBuildpacksError{}), 802 Entry("InvalidBuildpacksError", 803 CommandLineSettings{ 804 Buildpacks: []string{"default", "some-buildpack"}, 805 }, 806 []manifest.Application{{ 807 Name: "some-name-1", 808 Path: RealPath, 809 }}, 810 actionerror.InvalidBuildpacksError{}), 811 ) 812 })