Skip to content

Commit

Permalink
Merge branch 'main' into deps/jjbustamante/update-to-lifecycle-0_17_1
Browse files Browse the repository at this point in the history
  • Loading branch information
jkutner authored Sep 19, 2023
2 parents a31ee3b + 7af3ba2 commit d37ee85
Show file tree
Hide file tree
Showing 72 changed files with 4 additions and 13 deletions.
7 changes: 3 additions & 4 deletions acceptance/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ func testAcceptance(
var (
pack, createBuilderPack *invoke.PackInvoker
buildpackManager buildpacks.BuildModuleManager
bpDir = buildModulesDir(lifecycle.EarliestBuildpackAPIVersion())
bpDir = buildModulesDir()
assert = h.NewAssertionManager(t)
)

Expand All @@ -649,7 +649,6 @@ func testAcceptance(
buildpackManager = buildpacks.NewBuildModuleManager(
t,
assert,
buildpacks.WithBuildpackAPIVersion(lifecycle.EarliestBuildpackAPIVersion()),
)
})

Expand Down Expand Up @@ -2898,8 +2897,8 @@ include = [ "*.jar", "media/mountain.jpg", "/media/person.png", ]
})
}

func buildModulesDir(bpAPIVersion string) string {
return filepath.Join("testdata", "mock_buildpacks", bpAPIVersion)
func buildModulesDir() string {
return filepath.Join("testdata", "mock_buildpacks")
}

func createComplexBuilder(t *testing.T,
Expand Down
10 changes: 1 addition & 9 deletions acceptance/buildpacks/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import (
"path/filepath"
"testing"

"github.com/buildpacks/pack/internal/builder"

"github.com/buildpacks/pack/testhelpers"
)

Expand All @@ -20,17 +18,11 @@ type BuildModuleManager struct {

type BuildModuleManagerModifier func(b *BuildModuleManager)

func WithBuildpackAPIVersion(apiVersion string) func(b *BuildModuleManager) {
return func(b *BuildModuleManager) {
b.sourceDir = filepath.Join("testdata", "mock_buildpacks", apiVersion)
}
}

func NewBuildModuleManager(t *testing.T, assert testhelpers.AssertionManager, modifiers ...BuildModuleManagerModifier) BuildModuleManager {
m := BuildModuleManager{
testObject: t,
assert: assert,
sourceDir: filepath.Join("testdata", "mock_buildpacks", builder.DefaultBuildpackAPIVersion),
sourceDir: filepath.Join("testdata", "mock_buildpacks"),
}

for _, mod := range modifiers {
Expand Down

0 comments on commit d37ee85

Please sign in to comment.