コード例 #1
0
ファイル: roundtrip_test.go プロジェクト: glestaris/clique
							Time:      t,
						},
						api.TransferResults{
							IP:        net.ParseIP("12.15.12.18"),
							BytesSent: 15 * 1024,
							Checksum:  566124,
							Duration:  time.Second * 29,
							RTT:       time.Millisecond * 17,
							Time:      t,
						},
					}
					fakeRegistry.TransferResultsReturns(res)
				})

				It("should return the registry results", func() {
					recvRes, err := client.TransferResults()
					Expect(err).NotTo(HaveOccurred())

					Expect(recvRes).To(Equal(res))
				})

				It("should call the registry", func() {
					client.TransferResults()

					Expect(
						fakeRegistry.TransferResultsCallCount(),
					).To(Equal(1))
				})
			})

			Describe("GET /transfer_results/<IP>", func() {