var details brokerapi.DeprovisionDetails

		BeforeEach(func() {
			details = brokerapi.DeprovisionDetails{
				PlanID:    "plan-id",
				ServiceID: "service-id",
			}
		})

		It("one broker recognizes service instance", func() {
			subway.BackendBrokers = []*broker.BackendBroker{
				{URI: "TEST-UNKNOWN-INSTANCE"},
				{URI: "TEST-FOUND-INSTANCE"},
				{URI: "TEST-UNKNOWN-INSTANCE"},
			}
			_, err := subway.Deprovision("service-id", details, false)
			Ω(err).ToNot(HaveOccurred())
		})

		It("no broker recognizes service instance", func() {
			subway.BackendBrokers = []*broker.BackendBroker{
				{URI: "TEST-UNKNOWN-INSTANCE"},
				{URI: "TEST-UNKNOWN-INSTANCE"},
			}
			_, err := subway.Deprovision("service-id", details, false)
			Ω(err).To(HaveOccurred())
		})

	})
})
Esempio n. 2
0
				{URI: "TEST-UNKNOWN-INSTANCE"},
			}
			err := subway.Unbind("service-id", "bind-id")
			Ω(err).To(HaveOccurred())
		})

	})

	Describe(".Deprovision", func() {
		It("one broker recognizes service instance", func() {
			subway.BackendBrokers = []*broker.BackendBroker{
				{URI: "TEST-UNKNOWN-INSTANCE"},
				{URI: "TEST-FOUND-INSTANCE"},
				{URI: "TEST-UNKNOWN-INSTANCE"},
			}
			err := subway.Deprovision("service-id")
			Ω(err).ToNot(HaveOccurred())
		})

		It("no broker recognizes service instance", func() {
			subway.BackendBrokers = []*broker.BackendBroker{
				{URI: "TEST-UNKNOWN-INSTANCE"},
				{URI: "TEST-UNKNOWN-INSTANCE"},
			}
			err := subway.Deprovision("service-id")
			Ω(err).To(HaveOccurred())
		})

	})
})