Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Commit

Permalink
Removes ContainerLogs from integration suite (#15)
Browse files Browse the repository at this point in the history
The `BeAvailable` method will already fetch logs if the assertion fails

Co-authored-by: Daniel Thornton <[email protected]>
  • Loading branch information
ryanmoran and dwillist authored Jul 8, 2020
1 parent 7a9fdbe commit b2c1183
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
3 changes: 0 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
10 changes: 0 additions & 10 deletions integration/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion integration/nginx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit b2c1183

Please sign in to comment.