package main // The module's shape (novox/hq to-be 42 Phase 1, research 027): the package and the daemon, and // nothing written into the name service switch or opened in the packet filter — avahi.go says why // neither can be declared safely today, and the tools report both instead. import "testing" func TestItDeclaresThePackageAndTheDaemonOnly(t *testing.T) { m := manifest(t) if p := m.resource(t, "package"); p["package"] != "avahi" { t.Fatalf("%v", p) } d := m.resource(t, "daemon") if d["unit"] != Daemon || d["state"] != "running" || d["boot"] != "enabled" { t.Fatalf("%v", d) } for _, r := range m.Resources { if r["path"] == NSSwitch || r["package"] == "nss-mdns" { t.Fatalf("%v: the name service switch is left as found", r["id"]) } } if len(m.Resources) != 2 { t.Fatalf("%v", m.Resources) } }