Merge pull request 'The forge's whole-seat test ends NOT RUN when its npm tooling is missing (H-A-294)' (#730) from fix/47-H1-gitea-whole-test-not-run into main
This commit was merged in pull request #730.
This commit is contained in:
@@ -344,14 +344,27 @@ func numbers(v any) []float64 {
|
||||
return out
|
||||
}
|
||||
|
||||
// needTheModulesPackages ends the test NOT RUN, never failed, where what it builds and runs with is missing: node and npm
|
||||
// on the PATH and the module's installed SDK package under node_modules. The Go integration level is given the tree
|
||||
// without its npm packages and no network (issue 1960, H-A-294), as the Node build module's realMachine skips by name.
|
||||
func needTheModulesPackages(t *testing.T, dir string) {
|
||||
t.Helper()
|
||||
for _, p := range []string{"node", "npm"} {
|
||||
if _, err := exec.LookPath(p); err != nil {
|
||||
t.Skipf("NOT RUN: no %s installed where this check runs; proven in a working copy of the module after npm install", p)
|
||||
}
|
||||
}
|
||||
if _, err := os.Stat(filepath.Join(dir, "node_modules", "@novox", "mesh-sdk")); err != nil {
|
||||
t.Skipf("NOT RUN: the forge module's npm packages are not installed in %s (%v); proven in a working copy of the module after npm install", dir, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestTheSeatGitWholeOverARealBus(t *testing.T) {
|
||||
dir, err := filepath.Abs(filepath.Join("..", ".."))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, err := os.Stat(filepath.Join(dir, "node_modules", "@novox", "mesh-sdk")); err != nil {
|
||||
t.Fatalf("the forge module's packages are not installed in %s (npm install first): %v", dir, err)
|
||||
}
|
||||
needTheModulesPackages(t, dir)
|
||||
build := exec.Command("npm", "run", "build")
|
||||
build.Dir = dir
|
||||
if out, err := build.CombinedOutput(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user