. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" ) var _ = Describe("Update LBs", func() { var ( command commands.UpdateLBs incomingState storage.State certFilePath string keyFilePath string chainFilePath string certificateManager *fakes.CertificateManager certificateValidator *fakes.CertificateValidator availabilityZoneRetriever *fakes.AvailabilityZoneRetriever infrastructureManager *fakes.InfrastructureManager awsCredentialValidator *fakes.AWSCredentialValidator boshClientProvider *fakes.BOSHClientProvider boshClient *fakes.BOSHClient logger *fakes.Logger guidGenerator *fakes.GuidGenerator stateStore *fakes.StateStore stateValidator *fakes.StateValidator ) var updateLBs = func(certificatePath, keyPath, chainPath string, state storage.State) error { return command.Execute([]string{ "--cert", certificatePath, "--key", keyPath, "--chain", chainPath, }, state)
usageText := command.Usage() Expect(usageText).To(Equal(`Attaches load balancer(s) with a certificate, key, and optional chain --type Load balancer(s) type. Valid options: "concourse" or "cf" --cert Path to SSL certificate --key Path to SSL certificate key [--chain] Path to SSL certificate chain (optional) [--skip-if-exists] Skips creating load balancer(s) if it is already attached (optional)`)) }) }) }) Describe("Update LBs", func() { Describe("Usage", func() { It("returns string describing usage", func() { command := commands.UpdateLBs{} usageText := command.Usage() Expect(usageText).To(Equal(`Updates load balancer(s) with the supplied certificate, key, and optional chain --cert Path to SSL certificate --key Path to SSL certificate key [--chain] Path to SSL certificate chain (optional) [--skip-if-missing] Skips updating load balancer(s) if it is not attached (optional)`)) }) }) }) Describe("Delete LBs", func() { Describe("Usage", func() { It("returns string describing usage", func() { command := commands.DeleteLBs{}