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