From 433cbd52543dccdad9806b8d44fd5d054ed559f1 Mon Sep 17 00:00:00 2001 From: baude Date: Sat, 28 Jul 2018 11:11:31 -0500 Subject: Show duration for each ginkgo test and test speed improvements Because our tests are getting so long, we want to be able to audit which tests are taking the longest to complete. This may indicate a bad test, bad CI, bad code, etc and therefore should be auditable. Also, make speed improvements to tests by making sure we only unpack caches images that actually get used. Signed-off-by: baude Closes: #1178 Approved by: mheon --- test/e2e/run_dns_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/e2e/run_dns_test.go') diff --git a/test/e2e/run_dns_test.go b/test/e2e/run_dns_test.go index e2c0829f3..c5a02c776 100644 --- a/test/e2e/run_dns_test.go +++ b/test/e2e/run_dns_test.go @@ -3,6 +3,7 @@ package integration import ( "os" + "fmt" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -25,7 +26,9 @@ var _ = Describe("Podman run dns", func() { AfterEach(func() { podmanTest.Cleanup() - + f := CurrentGinkgoTestDescription() + timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) + GinkgoWriter.Write([]byte(timedResult)) }) It("podman run add search domain", func() { -- cgit v1.2.3-54-g00ecf