Stack: storage.Stack{ Name: "", LBType: "", CertificateName: "", }, })) }) }) Context("when there is no stack to delete", func() { BeforeEach(func() { stackManager.DescribeCall.Returns.Error = cloudformation.StackNotFound }) It("does not validate the vpc", func() { state.Stack = storage.Stack{} err := destroy.Execute([]string{}, state) Expect(err).NotTo(HaveOccurred()) Expect(vpcStatusChecker.ValidateSafeToDeleteCall.CallCount).To(Equal(0)) }) It("does not attempt to delete the stack", func() { state.Stack = storage.Stack{} err := destroy.Execute([]string{}, state) Expect(err).NotTo(HaveOccurred()) Expect(logger.PrintlnCall.Receives.Message).To(Equal("no AWS stack, skipping...")) Expect(infrastructureManager.DeleteCall.CallCount).To(Equal(0)) }) })