From 44a6bad86eb39b549e35964b4ff646dbce0358fe Mon Sep 17 00:00:00 2001 From: Chrstopher Hunter <8398225+crhntr@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:54:58 -0700 Subject: [PATCH] fix(acceptance): match any tile file name --- .../workflows/scenario/step_funcs_tile.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/internal/acceptance/workflows/scenario/step_funcs_tile.go b/internal/acceptance/workflows/scenario/step_funcs_tile.go index 2e758d67a..c642e4e12 100644 --- a/internal/acceptance/workflows/scenario/step_funcs_tile.go +++ b/internal/acceptance/workflows/scenario/step_funcs_tile.go @@ -8,7 +8,7 @@ import ( "fmt" "io/fs" "log" - "os" + "path/filepath" "strings" "github.com/pivotal-cf/kiln/pkg/cargo" @@ -23,12 +23,18 @@ import ( // aTileIsCreated asserts the output tile exists func aTileIsCreated(ctx context.Context) error { - tilePath, err := defaultFilePathForTile(ctx) + p, err := tileRepoPath(ctx) + if err != nil { + return err + } + matches, err := filepath.Glob(filepath.Join(p, "*.pivotal")) if err != nil { return err } - _, err = os.Stat(tilePath) - return err + if len(matches) == 0 { + return errors.New("no tile found") + } + return nil } // theTileContains checks that the filePaths exist in the tile