Skip to content

Commit 78fde8a

Browse files
ryanmorandwillist
andauthored
Resolves linting issues (#28)
Co-authored-by: Daniel Thornton <dthornton@pivotal.io>
1 parent aa4f6f2 commit 78fde8a

3 files changed

Lines changed: 16 additions & 20 deletions

File tree

bundle_install_process_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package bundleinstall_test
22

33
import (
44
"errors"
5+
"fmt"
56
"io/ioutil"
67
"os"
78
"strings"
@@ -67,8 +68,8 @@ func testBundleInstallProcess(t *testing.T, context spec.G, it spec.S) {
6768
it.Before(func() {
6869
executable.ExecuteCall.Stub = func(execution pexec.Execution) error {
6970
if strings.Contains(strings.Join(execution.Args, " "), "config") {
70-
execution.Stdout.Write([]byte("stdout output"))
71-
execution.Stderr.Write([]byte("stderr output"))
71+
fmt.Fprint(execution.Stdout, "stdout output")
72+
fmt.Fprint(execution.Stderr, "stderr output")
7273

7374
return errors.New("bundle config failed")
7475
}
@@ -87,8 +88,8 @@ func testBundleInstallProcess(t *testing.T, context spec.G, it spec.S) {
8788
it.Before(func() {
8889
executable.ExecuteCall.Stub = func(execution pexec.Execution) error {
8990
if strings.Contains(strings.Join(execution.Args, " "), "install") {
90-
execution.Stdout.Write([]byte("stdout output"))
91-
execution.Stderr.Write([]byte("stderr output"))
91+
fmt.Fprint(execution.Stdout, "stdout output")
92+
fmt.Fprint(execution.Stderr, "stderr output")
9293

9394
return errors.New("bundle install failed")
9495
}

go.sum

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,8 @@ github.com/onsi/gomega v1.10.0 h1:Gwkk+PTu/nfOwNMtUB/mRUv0X7ewW5dO4AERT1ThVKo=
162162
github.com/onsi/gomega v1.10.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
163163
github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
164164
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
165-
github.com/paketo-buildpacks/occam v0.0.8 h1:Of7BUZi/EzwO89XEhLhFULDBeggtSP2wpHzPCJBjnk0=
166-
github.com/paketo-buildpacks/occam v0.0.8/go.mod h1:kJRrFPHH2/mr7nqBQE8Wb/VvEJ2JOcVWx40haWHJjO4=
167-
github.com/paketo-buildpacks/occam v0.0.12 h1:j2yl/dx7ut4nwHwFndoES3szhO8G+CeDe+vAbrQRQfw=
168-
github.com/paketo-buildpacks/occam v0.0.12/go.mod h1:eY5lAyFJLmNq7bc3bSIyvoUSXnyQSBQ138RZPvv5EC8=
169165
github.com/paketo-buildpacks/occam v0.0.13 h1:KWA4YVFe+shbBwM1TYxJMkl7sOW7OC+1UQFtb2Vkt64=
170166
github.com/paketo-buildpacks/occam v0.0.13/go.mod h1:YzM19WUBeTUYldLWujLR1BE0BfyFiECvluds0ZhbORo=
171-
github.com/paketo-buildpacks/packit v0.0.10 h1:W29he2huZn6UcSWO6nMgBUQlLBUi4pCrQS+VXcCfYBQ=
172-
github.com/paketo-buildpacks/packit v0.0.10/go.mod h1:S2ud8PcMgCjnOjIYnlituwDFL12uQ9eWy9qjTHlM/IM=
173167
github.com/paketo-buildpacks/packit v0.0.14 h1:ySq6WC/WKsOmUdsg9Uh1ggpDkyV0opJuJTus5DYv+lg=
174168
github.com/paketo-buildpacks/packit v0.0.14/go.mod h1:b40wtWWAcgB47+vYGDD9KKhzOtBjI8KPqGxwGvV+XNs=
175169
github.com/paketo-buildpacks/packit v0.0.15 h1:BYcZAyHcKF+n9DKroAiYC1CgbCHIshcerxeMYq5rq4A=
@@ -290,8 +284,6 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w
290284
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
291285
golang.org/x/sys v0.0.0-20200413165638-669c56c373c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
292286
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
293-
golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3 h1:5B6i6EAiSYyejWfvc5Rc9BbI3rzIsrrXfAQBWnYfn+w=
294-
golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
295287
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 h1:OjiUf46hAmXblsZdnoSXsEUSKU8r1UEzcL5RVZ4gO9Y=
296288
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
297289
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

integration/init_test.go

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,23 @@ func TestIntegration(t *testing.T) {
4848
buildPlanURI, err = dagger.GetLatestCommunityBuildpack("ForestEckhardt", "build-plan")
4949
Expect(err).NotTo(HaveOccurred())
5050

51-
defer func() {
52-
dagger.DeleteBuildpack(bundleInstallURI)
53-
dagger.DeleteBuildpack(bundlerURI)
54-
dagger.DeleteBuildpack(mriURI)
55-
dagger.DeleteBuildpack(buildPlanURI)
56-
}()
57-
5851
SetDefaultEventuallyTimeout(10 * time.Second)
5952

6053
suite := spec.New("Integration", spec.Report(report.Terminal{}), spec.Parallel())
6154
suite("SimpleApp", testSimpleApp)
6255
suite("Logging", testLogging)
6356

64-
dagger.SyncParallelOutput(func() { suite.Run(t) })
57+
defer AfterSuite(t)
58+
suite.Run(t)
59+
}
60+
61+
func AfterSuite(t *testing.T) {
62+
var Expect = NewWithT(t).Expect
63+
64+
Expect(dagger.DeleteBuildpack(bundleInstallURI)).To(Succeed())
65+
Expect(dagger.DeleteBuildpack(bundlerURI)).To(Succeed())
66+
Expect(dagger.DeleteBuildpack(mriURI)).To(Succeed())
67+
Expect(dagger.DeleteBuildpack(buildPlanURI)).To(Succeed())
6568
}
6669

6770
func ContainerLogs(id string) func() string {

0 commit comments

Comments
 (0)