Exemplo n.º 1
0
					Ω(rule.Log).Should(BeTrue())
				})
			})

			itResetsGraceTimeWhenHandling(func() {
				err := container.NetOut(garden.NetOutRule{})
				Ω(err).ShouldNot(HaveOccurred())
			})

			itFailsWhenTheContainerIsNotFound(func() error {
				return container.NetOut(garden.NetOutRule{})
			})

			Context("when permitting traffic fails", func() {
				BeforeEach(func() {
					fakeContainer.NetOutReturns(errors.New("oh no!"))
				})

				It("fails", func() {
					err := container.NetOut(garden.NetOutRule{})
					Ω(err).Should(HaveOccurred())
				})
			})
		})

		Describe("info", func() {
			containerInfo := garden.ContainerInfo{
				State:         "active",
				Events:        []string{"oom", "party"},
				HostIP:        "host-ip",
				ContainerIP:   "container-ip",