Skip to content

Commit

Permalink
renaming the methods
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Bustamante <[email protected]>
  • Loading branch information
jjbustamante committed Feb 7, 2024
1 parent f24d3bc commit 572f869
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion acceptance/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2933,7 +2933,7 @@ include = [ "*.jar", "media/mountain.jpg", "/media/person.png", ]
when("builder create", func() {
when("--flatten=<buildpacks>", func() {
it("should flatten together all specified buildpacks", func() {
h.SkipIf(t, createBuilderPack.SupportsFeature(invoke.SkipFlattenBuilderCreation), "pack version <= 0.33.0 fails with this test")
h.SkipIf(t, !createBuilderPack.SupportsFeature(invoke.FlattenBuilderCreationV2), "pack version <= 0.33.0 fails with this test")
h.SkipIf(t, imageManager.HostOS() == "windows", "These tests are not yet compatible with Windows-based containers")

// create a task, handled by a 'task manager' which executes our pack commands during tests.
Expand Down
13 changes: 3 additions & 10 deletions acceptance/invoke/pack.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ const (
BuildpackFlatten
MetaBuildpackFolder
PlatformRetries
SkipFlattenBuilderCreation
FlattenBuilderCreationV2
)

var featureTests = map[Feature]func(i *PackInvoker) bool{
Expand Down Expand Up @@ -267,8 +267,8 @@ var featureTests = map[Feature]func(i *PackInvoker) bool{
PlatformRetries: func(i *PackInvoker) bool {
return i.atLeast("v0.32.1")
},
SkipFlattenBuilderCreation: func(i *PackInvoker) bool {
return i.equal("v0.33.0")
FlattenBuilderCreationV2: func(i *PackInvoker) bool {
return i.atLeast("v0.33.1")
},
}

Expand Down Expand Up @@ -298,13 +298,6 @@ func (i *PackInvoker) atLeast(version string) bool {
return ver.Equal(minimalVersion) || ver.GreaterThan(minimalVersion) || ver.Equal(semver.MustParse("0.0.0"))
}

// equal returns true if pack version is the equal to the provided version
func (i *PackInvoker) equal(version string) bool {
minimalVersion := semver.MustParse(version)
ver := i.semanticVersion()
return ver.Equal(minimalVersion)
}

func (i *PackInvoker) ConfigFileContents() string {
i.testObject.Helper()

Expand Down

0 comments on commit 572f869

Please sign in to comment.