func (*Dependencies) TestPackageDependencies(c *gc.C) { // This test is to ensure we don't bring in dependencies without thinking. // Looking at the "environs/config", it is just for JujuHome. This should // really be moved into "juju/osenv". c.Assert(coretesting.FindJujuCoreImports(c, "github.com/juju/juju/cmd"), jc.DeepEquals, []string{"juju/arch", "juju/osenv", "version"}) }
func (t *ToolsSuite) TestPackageDependencies(c *gc.C) { // This test is to ensure we don't bring in dependencies on state, environ // or any of the other bigger packages that'll drag in yet more dependencies. // Only imports that start with "github.com/juju/juju" are checked, and the // resulting slice has that prefix removed to keep the output short. c.Assert(testing.FindJujuCoreImports(c, "github.com/juju/juju/agent/tools"), gc.DeepEquals, []string{"tools"}) }
func (*importSuite) TestParamsDoesNotDependOnState(c *gc.C) { imports := testing.FindJujuCoreImports(c, "github.com/juju/juju/apiserver/params") for _, i := range imports { c.Assert(i, gc.Not(gc.Equals), "state") } }
func (*importSuite) TestDependencies(c *gc.C) { c.Assert(coretesting.FindJujuCoreImports(c, "github.com/juju/juju/juju/osenv"), gc.HasLen, 0) }