Beispiel #1
0
		process = ifrit.Invoke(runner)
	})

	AfterEach(func() {
		ginkgomon.Interrupt(process, exitDuration)
	})

	Describe("Flag validation", func() {
		Context("when the listenAddress does not match host:port pattern", func() {
			BeforeEach(func() {
				runner = newNSyncRunner("portless")
			})

			It("exits with an error", func() {
				Eventually(runner).Should(gexec.Exit(2))
				Expect(runner.Buffer()).Should(gbytes.Say("missing port"))
			})
		})

		Context("when the listenAddress port is not a number or recognized service", func() {
			BeforeEach(func() {
				runner = newNSyncRunner("127.0.0.1:onehundred")
			})

			It("exits with an error", func() {
				Eventually(runner).Should(gexec.Exit(2))
				Expect(runner.Buffer()).Should(gbytes.Say("unknown port"))
			})
		})
	})
Beispiel #2
0
		process = ifrit.Invoke(runner)
	})

	AfterEach(func() {
		ginkgomon.Interrupt(process, exitDuration)
	})

	Describe("Flag validation", func() {
		Context("when the listenAddress does not match host:port pattern", func() {
			BeforeEach(func() {
				runner = newNSyncRunner("portless")
			})

			It("exits with an error", func() {
				Eventually(runner).Should(gexec.Exit(2))
				Expect(runner.Buffer()).Should(gbytes.Say("missing port"))
			})
		})

		Context("when the listenAddress port is not a number or recognized service", func() {
			BeforeEach(func() {
				runner = newNSyncRunner("127.0.0.1:onehundred")
			})

			It("exits with an error", func() {
				Eventually(runner).Should(gexec.Exit(2))
				Expect(runner.Buffer()).Should(gbytes.Say("nsync-listener.failed-invalid-listen-port"))
			})
		})
	})