示例#1
0
					_, err = client.BulkInfo(handles)
					Expect(err).NotTo(HaveOccurred())
					_, err = client.BulkMetrics(handles)
					Expect(err).NotTo(HaveOccurred())
				}

				// destroy containers
				Expect(client.DestroyContainers()).To(Succeed())
			})

			AfterEach(func() {
				Expect(client.DestroyAndStop()).To(Succeed())
			})

			It("doesn't log too many messages", func() {
				outLines := strings.Split(string(client.Buffer().Contents()), "\n")
				Expect(len(outLines)).To(BeNumerically("<", 300))
			})
		})
	})

	Context("when a nonsense log-level is passed", func() {
		BeforeEach(func() {
			args = []string{"--log-level", "nonsense-log-level"}
		})

		It("exits with a code of 1", func() {
			Eventually(client, "1s").Should(gexec.Exit(1))
		})
	})
})