Skip to content

Commit

Permalink
fix(acceptance): match any tile file name
Browse files Browse the repository at this point in the history
  • Loading branch information
crhntr committed Jul 24, 2024
1 parent faf47d0 commit 44a6bad
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions internal/acceptance/workflows/scenario/step_funcs_tile.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"io/fs"
"log"
"os"
"path/filepath"
"strings"

"github.com/pivotal-cf/kiln/pkg/cargo"
Expand All @@ -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
Expand Down

0 comments on commit 44a6bad

Please sign in to comment.