Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
30 changes: 17 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
module github.com/cloudfoundry/staticfile-buildpack

go 1.23.4
go 1.24.0

require (
github.com/Dynatrace/libbuildpack-dynatrace v1.8.0
github.com/cloudfoundry/libbuildpack v0.0.0-20240717165421-f2ae8069fcba
github.com/cloudfoundry/switchblade v0.9.4
github.com/golang/mock v1.6.0
github.com/kardolus/httpmock v0.0.0-20181110092731-53def6cd0f87
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.36.2
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.39.0
github.com/sclevine/spec v1.4.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0 // indirect
go.opentelemetry.io/otel/sdk v1.32.0 // indirect
)

require github.com/onsi/ginkgo/v2 v2.28.1

require (
code.cloudfoundry.org/lager v2.0.0+incompatible // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/semver/v3 v3.4.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
Expand All @@ -30,18 +33,19 @@ require (
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.6 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/nxadm/tail v1.4.11 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/paketo-buildpacks/packit v1.3.1 // indirect
github.com/paketo-buildpacks/packit/v2 v2.16.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
github.com/teris-io/shortid v0.0.0-20220617161101-71ec9f2aa569 // indirect
github.com/tidwall/gjson v1.18.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
Expand All @@ -51,17 +55,17 @@ require (
go.opentelemetry.io/otel v1.32.0 // indirect
go.opentelemetry.io/otel/metric v1.32.0 // indirect
go.opentelemetry.io/otel/trace v1.32.0 // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.35.0 // indirect
golang.org/x/sync v0.11.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/text v0.22.0 // indirect
golang.org/x/tools v0.29.0 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/mod v0.32.0 // indirect
golang.org/x/net v0.49.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.40.0 // indirect
golang.org/x/text v0.33.0 // indirect
golang.org/x/tools v0.41.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

exclude google.golang.org/genproto v0.0.0-20230403163135-ca9f95a91c1a
Expand Down
68 changes: 44 additions & 24 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/.util/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function util::tools::ginkgo::install() {
pushd /tmp > /dev/null || return
GOBIN="${dir}" \
go install \
github.com/onsi/ginkgo/ginkgo@latest
github.com/onsi/ginkgo/v2/ginkgo@latest
popd > /dev/null || return
fi
}
Expand Down
2 changes: 1 addition & 1 deletion src/staticfile/brats/brats_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/cloudfoundry/libbuildpack/bratshelper"
"github.com/cloudfoundry/libbuildpack/cutlass"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion src/staticfile/brats/brats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package brats_test

import (
"github.com/cloudfoundry/libbuildpack/bratshelper"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
)

var _ = Describe("Staticfile buildpack", func() {
Expand Down
2 changes: 1 addition & 1 deletion src/staticfile/finalize/finalize_suite_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package finalize_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"testing"
Expand Down
27 changes: 13 additions & 14 deletions src/staticfile/finalize/finalize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/cloudfoundry/libbuildpack/ansicleaner"
"github.com/golang/mock/gomock"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down Expand Up @@ -48,6 +48,13 @@ var _ = Describe("Compile", func() {

mockCtrl = gomock.NewController(GinkgoT())
mockYaml = NewMockYAML(mockCtrl)
DeferCleanup(func() {
err = os.RemoveAll(buildDir)
Expect(err).To(BeNil())

err = os.RemoveAll(depDir)
Expect(err).To(BeNil())
})
})

JustBeforeEach(func() {
Expand All @@ -60,16 +67,6 @@ var _ = Describe("Compile", func() {
}
})

AfterEach(func() {
mockCtrl.Finish()

err = os.RemoveAll(buildDir)
Expect(err).To(BeNil())

err = os.RemoveAll(depDir)
Expect(err).To(BeNil())
})

Describe("WriteStartupFiles", func() {
It("writes staticfile.sh to the profile.d directory", func() {
err = finalizer.WriteStartupFiles()
Expand Down Expand Up @@ -909,9 +906,11 @@ var _ = Describe("Compile", func() {
Expect(err).To(BeNil())
})

AfterEach(func() {
err = os.RemoveAll(appRootDir)
Expect(err).To(BeNil())
BeforeEach(func() {
DeferCleanup(func() {
err = os.RemoveAll(appRootDir)
Expect(err).To(BeNil())
})
})

Context("The appRootDir is <buildDir>/public", func() {
Expand Down
2 changes: 1 addition & 1 deletion src/staticfile/hooks/hooks_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

"github.com/kardolus/httpmock"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion src/staticfile/supply/supply_suite_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package supply_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"testing"
Expand Down
10 changes: 2 additions & 8 deletions src/staticfile/supply/supply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/cloudfoundry/libbuildpack"
"github.com/golang/mock/gomock"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down Expand Up @@ -48,6 +48,7 @@ var _ = Describe("Supply", func() {
mockCtrl = gomock.NewController(GinkgoT())
mockManifest = NewMockManifest(mockCtrl)
mockInstaller = NewMockInstaller(mockCtrl)
DeferCleanup(os.RemoveAll, depsDir)
})

JustBeforeEach(func() {
Expand All @@ -62,13 +63,6 @@ var _ = Describe("Supply", func() {
}
})

AfterEach(func() {
mockCtrl.Finish()

err = os.RemoveAll(depsDir)
Expect(err).To(BeNil())
})

Describe("InstallNginx", func() {
BeforeEach(func() {
dep := libbuildpack.Dependency{Name: "nginx", Version: "99.99"}
Expand Down
1 change: 1 addition & 0 deletions vendor/github.com/Masterminds/semver/v3/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions vendor/github.com/Masterminds/semver/v3/.golangci.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading