From 572f8696f383f0e959775776b25a73633d4a0263 Mon Sep 17 00:00:00 2001 From: Juan Bustamante Date: Tue, 6 Feb 2024 19:05:53 -0500 Subject: [PATCH] renaming the methods Signed-off-by: Juan Bustamante --- acceptance/acceptance_test.go | 2 +- acceptance/invoke/pack.go | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/acceptance/acceptance_test.go b/acceptance/acceptance_test.go index 2895142c32..05ceea2e2f 100644 --- a/acceptance/acceptance_test.go +++ b/acceptance/acceptance_test.go @@ -2933,7 +2933,7 @@ include = [ "*.jar", "media/mountain.jpg", "/media/person.png", ] when("builder create", func() { when("--flatten=", 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. diff --git a/acceptance/invoke/pack.go b/acceptance/invoke/pack.go index b43ef2a3b5..e10bcdfe26 100644 --- a/acceptance/invoke/pack.go +++ b/acceptance/invoke/pack.go @@ -236,7 +236,7 @@ const ( BuildpackFlatten MetaBuildpackFolder PlatformRetries - SkipFlattenBuilderCreation + FlattenBuilderCreationV2 ) var featureTests = map[Feature]func(i *PackInvoker) bool{ @@ -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") }, } @@ -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()