예제 #1
0
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"})
}
예제 #2
0
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"})
}
예제 #3
0
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")
	}
}
예제 #4
0
파일: package_test.go 프로젝트: jiasir/juju
func (*importSuite) TestDependencies(c *gc.C) {
	c.Assert(coretesting.FindJujuCoreImports(c, "github.com/juju/juju/juju/osenv"),
		gc.HasLen, 0)
}