It("fails validation with errors", func() { cmd = bmp.NewSlCommand(options, fakeBmpClient) validate, err := cmd.Validate() Expect(validate).To(BeFalse()) Expect(err).To(HaveOccurred()) }) }) }) }) Describe("#Execute", func() { Context("executes a good SlCommand", func() { Context("when executes sl --packages", func() { BeforeEach(func() { fakeBmpClient.SlPackagesResponse.Status = 200 fakeBmpClient.SlPackagesErr = nil options = cmds.Options{ Verbose: false, Packages: true, } }) It("executes without errors", func() { cmd = bmp.NewSlCommand(options, fakeBmpClient) rc, err := cmd.Execute([]string{"bmp", "sl", "--packages"}) Expect(rc).To(Equal(0)) Expect(err).ToNot(HaveOccurred()) }) }) Context("when executes sl --package-options 1", func() {