package builds import ( "os/exec" "strings" "testing" ) // The builder's published value is read by modules that never touch the bus (mesh-host's composer tool): nothing it // imports reaches the bus library. func TestThePackageReachesNoBus(t *testing.T) { out, err := exec.Command("go", "list", "-deps", ".").Output() if err != nil { t.Fatalf("go list: %v", err) } for _, p := range strings.Fields(string(out)) { if strings.HasPrefix(p, "github.com/nats-io/") { t.Errorf("builds depends on %s", p) } } }