diff --git a/integration/suites/build/stapel_image/build_phase/build_phase_test.go b/integration/suites/build/stapel_image/build_phase/build_phase_test.go index e2c6dcb1fa..634faf7f0e 100644 --- a/integration/suites/build/stapel_image/build_phase/build_phase_test.go +++ b/integration/suites/build/stapel_image/build_phase/build_phase_test.go @@ -7,6 +7,7 @@ import ( "strings" "sync" + "github.com/gookit/color" "github.com/otiai10/copy" "github.com/werf/werf/integration/pkg/utils" "github.com/werf/werf/integration/pkg/utils/liveexec" @@ -30,16 +31,13 @@ func ExtractStageInfoFromOutputLine(stageInfo *StageInfo, line string) *StageInf } fields := strings.Fields(line) - if strings.Contains(line, "image_id: ") { + if strings.Contains(line, "id: ") { stageInfo.ImageID = fields[len(fields)-1] } - if strings.Contains(line, "repository: ") { - stageInfo.Repository = fields[len(fields)-1] - } if strings.Contains(line, "name: ") { nameParts := strings.Split(fields[len(fields)-1], ":") - stageInfo.Repository = nameParts[0] - stageInfo.Tag = nameParts[1] + stageInfo.Repository = color.ClearCode(nameParts[0]) + stageInfo.Tag = color.ClearCode(nameParts[1]) sigAndID := strings.SplitN(stageInfo.Tag, "-", 2) stageInfo.Digest = sigAndID[0] diff --git a/pkg/true_git/service_branch_test.go b/pkg/true_git/service_branch_test.go index 6191b6d921..bb98dbdd48 100644 --- a/pkg/true_git/service_branch_test.go +++ b/pkg/true_git/service_branch_test.go @@ -243,9 +243,10 @@ var _ = Describe("SyncSourceWorktreeWithServiceBranch", func() { "git", "show", serviceCommit+":"+trackedFileRelPath, ) - Ω(err).Should(HaveOccurred()) - Ω(string(bytes)).Should(Equal(fmt.Sprintf("fatal: Path '%s' does not exist in '%s'\n", trackedFileRelPath, serviceCommit))) + + output := string(bytes) + Ω(output).Should(ContainSubstring(fmt.Sprintf("'%s' does not exist in '%s'", trackedFileRelPath, serviceCommit))) }) }) }) @@ -309,9 +310,10 @@ var _ = Describe("SyncSourceWorktreeWithServiceBranch", func() { "git", "show", serviceCommit+":"+untrackedFileRelPath, ) - Ω(err).Should(HaveOccurred()) - Ω(string(bytes)).Should(Equal(fmt.Sprintf("fatal: Path '%s' exists on disk, but not in '%s'.\n", untrackedFileRelPath, serviceCommit))) + + output := string(bytes) + Ω(output).Should(ContainSubstring(fmt.Sprintf("'%s' exists on disk, but not in '%s'", untrackedFileRelPath, serviceCommit))) }) }) })