Exemplo n.º 1
0
				},
				CPUStat: garden.ContainerCPUStat{
					Usage:  1,
					User:   2,
					System: 3,
				},
				DiskStat: garden.ContainerDiskStat{
					BytesUsed:  1,
					InodesUsed: 2,
				},
			}

			Context("when getting the metrics succeeds", func() {
				BeforeEach(func() {
					fakeContainer.MetricsReturns(
						containerMetrics,
						nil,
					)
				})

				It("returns the metrics from the container", func() {
					value, err := container.Metrics()
					Ω(err).ShouldNot(HaveOccurred())

					Ω(value).Should(Equal(containerMetrics))
				})

				itResetsGraceTimeWhenHandling(func() {
					_, err := container.Metrics()
					Ω(err).ShouldNot(HaveOccurred())
				})