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