Fix: Resolve daggerbuild E2E path doubling issue

- Extract just suite name from full path using filepath.Base()
- Prevents doubled paths like './e2e/e2e/dashboards-suite/videos'
- Resolves 'no spec files found' and 'no such file or directory' errors
- GitHub Actions passes full paths like 'e2e/dashboards-suite' but run-suite script expects just 'dashboards-suite'
This commit is contained in:
jev forsberg
2025-07-16 15:30:26 -06:00
parent 6018425a9c
commit 7894c4becf
+5 -2
View File
@@ -6,6 +6,7 @@ import (
"fmt"
"log"
"os"
"path/filepath"
"dagger.io/dagger"
)
@@ -44,9 +45,11 @@ func main() {
panic(err)
}
videosDir := fmt.Sprintf("/src/e2e/%s/videos", *suite)
// Extract just the suite name from the path (e.g., "e2e/dashboards-suite" -> "dashboards-suite")
suiteName := filepath.Base(*suite)
videosDir := fmt.Sprintf("/src/e2e/%s/videos", suiteName)
// *spec.ts.mp4
c := RunSuite(d, svc, grafana, yarnCache, *suite)
c := RunSuite(d, svc, grafana, yarnCache, suiteName)
c, err = c.Sync(ctx)
if err != nil {
log.Fatalf("error running dagger: %s", err)