Exemplo n.º 1
0
				handle, setName, setValue := innerConnection.SetPropertyArgsForCall(0)
				Ω(handle).Should(Equal("la-contineur"))
				Ω(setName).Should(Equal("some-name"))
				Ω(setValue).Should(Equal("some-value"))
			})
		})
	})

	Describe("RemoveProperty", func() {
		itRetries(func() error {
			return conn.RemoveProperty("la-contineur", "some-name")
		}, func(err error) {
			innerConnection.RemovePropertyReturns(err)
		}, func() int {
			return innerConnection.RemovePropertyCallCount()
		}, func() {
			It("calls through to garden", func() {
				Ω(innerConnection.RemovePropertyCallCount()).Should(Equal(1))

				handle, setName := innerConnection.RemovePropertyArgsForCall(0)
				Ω(handle).Should(Equal("la-contineur"))
				Ω(setName).Should(Equal("some-name"))
			})
		})
	})

	Describe("Stop", func() {
		itRetries(func() error {
			return conn.Stop("la-contineur", true)
		}, func(err error) {
				handle, setName, setValue := innerConnection.SetPropertyArgsForCall(0)
				Expect(handle).To(Equal("la-contineur"))
				Expect(setName).To(Equal("some-name"))
				Expect(setValue).To(Equal("some-value"))
			})
		})
	})

	Describe("RemoveProperty", func() {
		itRetries(func() error {
			return conn.RemoveProperty("la-contineur", "some-name")
		}, func(err error) {
			innerConnection.RemovePropertyReturns(err)
		}, func() int {
			return innerConnection.RemovePropertyCallCount()
		}, func() {
			It("calls through to garden", func() {
				Expect(innerConnection.RemovePropertyCallCount()).To(Equal(1))

				handle, setName := innerConnection.RemovePropertyArgsForCall(0)
				Expect(handle).To(Equal("la-contineur"))
				Expect(setName).To(Equal("some-name"))
			})
		})
	})

	Describe("Stop", func() {
		itRetries(func() error {
			return conn.Stop("la-contineur", true)
		}, func(err error) {