package app import ( "os" "path/filepath" "strings" "testing" ) // TestWriteBundleDocs covers the primitive shared by both consumers — // BuildSupportBundle (support-bundle archive root) and blackboxWorker.syncCycle // (removable-media boot-folder root) — since a blackbox capture has no // manifest.txt/tar-archive test harness to drive syncCycle end-to-end, but // both call this same function at their respective root. func TestWriteBundleDocs(t *testing.T) { root := t.TempDir() if err := writeBundleDocs(root); err != nil { t.Fatalf("writeBundleDocs: %v", err) } readme, err := os.ReadFile(filepath.Join(root, "README.md")) if err != nil { t.Fatalf("read README.md: %v", err) } if !strings.Contains(string(readme), "bee-audit.json") { t.Fatalf("README.md should explain where the hardware inventory lives:\n%s", readme) } if !strings.Contains(string(readme), "overall_status") { t.Fatalf("README.md should explain how to check SAT pass/fail:\n%s", readme) } }