Skip to content

Commit

Permalink
Handle helmtest build import failures
Browse files Browse the repository at this point in the history
  • Loading branch information
MacroPower committed Jan 1, 2025
1 parent ff71e66 commit d428197
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/helmtest/clienttest.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ import (
var DefaultTestClient helm.ChartClient

func init() {
pkg, _ := build.Default.Import("github.com/MacroPower/kclx/pkg/helmtest", ".", build.FindOnly)
testDataDir := filepath.Join(pkg.Dir, "testdata")
pkg, err := build.Default.Import("github.com/MacroPower/kclx/pkg/helmtest", ".", build.FindOnly)
if err != nil {
panic(fmt.Errorf("failed to find package: %w", err))
}

testDataDir := filepath.Join(pkg.Dir, "testdata")
DefaultTestClient = &TestClient{
BaseClient: helm.MustNewClient(helm.NewTempPaths(testDataDir, &TestPathEncoder{}), "test", "10M"),
}
Expand Down

0 comments on commit d428197

Please sign in to comment.