From b2c11835e2b4bf9f82209b178c9d796384803afd Mon Sep 17 00:00:00 2001 From: Ryan Moran <155736+ryanmoran@users.noreply.github.com> Date: Wed, 8 Jul 2020 09:33:24 -0400 Subject: [PATCH] Removes ContainerLogs from integration suite (#15) The `BeAvailable` method will already fetch logs if the assertion fails Co-authored-by: Daniel Thornton --- go.sum | 3 --- integration/init_test.go | 10 ---------- integration/nginx_test.go | 2 +- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/go.sum b/go.sum index bf87079..bf8e8e2 100644 --- a/go.sum +++ b/go.sum @@ -159,11 +159,8 @@ github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1ls github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/onsi/gomega v1.10.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/paketo-buildpacks/occam v0.0.9 h1:4R3UNM49T6zJPn6pvodqXgqwlr4VDmotZGSbbXIMW8I= -github.com/paketo-buildpacks/occam v0.0.9/go.mod h1:AexMesORz5Wa+3sULK/s2WD0Qo/AuLiPVeoxKPwDwq4= github.com/paketo-buildpacks/occam v0.0.13 h1:KWA4YVFe+shbBwM1TYxJMkl7sOW7OC+1UQFtb2Vkt64= github.com/paketo-buildpacks/occam v0.0.13/go.mod h1:YzM19WUBeTUYldLWujLR1BE0BfyFiECvluds0ZhbORo= github.com/paketo-buildpacks/occam v0.0.16 h1:RnEizv5F5O5LL1VeOiOh8WkNosybbEPOMys6730yopw= diff --git a/integration/init_test.go b/integration/init_test.go index ffd83eb..bff6772 100644 --- a/integration/init_test.go +++ b/integration/init_test.go @@ -8,7 +8,6 @@ import ( "time" "github.com/cloudfoundry/dagger" - "github.com/paketo-buildpacks/occam" "github.com/paketo-buildpacks/packit/pexec" "github.com/sclevine/spec" "github.com/sclevine/spec/report" @@ -49,15 +48,6 @@ func TestIntegration(t *testing.T) { suite.Run(t) } -func ContainerLogs(id string) func() string { - docker := occam.NewDocker() - - return func() string { - logs, _ := docker.Container.Logs.Execute(id) - return logs.String() - } -} - func GetGitVersion() (string, error) { gitExec := pexec.NewExecutable("git") revListOut := bytes.NewBuffer(nil) diff --git a/integration/nginx_test.go b/integration/nginx_test.go index 1d3245d..c7fbb27 100644 --- a/integration/nginx_test.go +++ b/integration/nginx_test.go @@ -66,7 +66,7 @@ func testNginx(t *testing.T, context spec.G, it spec.S) { container, err = docker.Container.Run.Execute(image.ID) Expect(err).NotTo(HaveOccurred()) - Eventually(container).Should(BeAvailable(), ContainerLogs(container.ID)) + Eventually(container).Should(BeAvailable()) response, err := http.Get(fmt.Sprintf("http://localhost:%s", container.HostPort())) Expect(err).NotTo(HaveOccurred())