fix(volume) File from project root failed
All checks were successful
Go-Tests / tests (pull_request) Successful in 1m47s
Go-Tests / sonar (pull_request) Successful in 48s
Go-Tests / tests (push) Successful in 1m37s
Go-Tests / sonar (push) Successful in 46s

When mounting one file from the root of the project (e.g. ./file.txt),
the volume name is empty. In this case, we generate the volume name from
the subpath.
This commit is contained in:
2025-09-14 23:23:11 +02:00
parent 8358b068b3
commit 03b4d5c714
3 changed files with 32 additions and 3 deletions

View File

@@ -29,13 +29,22 @@ func teardown(tmpDir string) {
}
}
// internalCompileTestForce is like internalCompileTest but with the force option enabled to rewrite the chart.
func internalCompileTestForce(t *testing.T, options ...string) string {
return compileTest(t, true, options...)
}
// internalCompileTest is like compileTest but without the force option enabled to rewrite the chart.
func internalCompileTest(t *testing.T, options ...string) string {
return compileTest(t, false, options...)
}
func compileTest(t *testing.T, force bool, options ...string) string {
_, err := parser.Parse(nil, nil, "compose.yml")
if err != nil {
t.Fatalf("Failed to parse the project: %s", err)
}
force := false
outputDir := "./chart"
profiles := make([]string, 0)
helmdepUpdate := true