~rogpeppe/juju-core/387-use-testing-set

« back to all changes in this revision

Viewing changes to agent/tools/diskmanager_test.go

  • Committer: Ian Booth
  • Date: 2013-08-21 05:38:38 UTC
  • mto: (1603.8.2 simplify-tools-search)
  • mto: This revision was merged to the branch mainline in revision 1702.
  • Revision ID: ian.booth@canonical.com-20130821053838-3c9oahds4mg2u0l7
Pull out Tools struct to its own package

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
        "launchpad.net/juju-core/agent/tools"
13
13
        coretesting "launchpad.net/juju-core/testing"
 
14
        coretools "launchpad.net/juju-core/tools"
14
15
        "launchpad.net/juju-core/version"
15
16
)
16
17
 
41
42
                coretesting.NewTarFile("bar", 0755, "bar contents"),
42
43
                coretesting.NewTarFile("foo", 0755, "foo contents"),
43
44
        }
44
 
        t1 := &tools.Tools{
 
45
        t1 := &coretools.Tools{
45
46
                URL:     "http://foo/bar",
46
47
                Version: version.MustParseBinary("1.2.3-foo-bar"),
47
48
        }
53
54
 
54
55
        // Try to unpack the same version of tools again - it should succeed,
55
56
        // leaving the original version around.
56
 
        t2 := &tools.Tools{
 
57
        t2 := &coretools.Tools{
57
58
                URL:     "http://arble",
58
59
                Version: version.MustParseBinary("1.2.3-foo-bar"),
59
60
        }
75
76
 
76
77
// assertToolsContents asserts that the directory for the tools
77
78
// has the given contents.
78
 
func (s *DiskManagerSuite) assertToolsContents(c *gc.C, t *tools.Tools, files []*coretesting.TarFile) {
 
79
func (s *DiskManagerSuite) assertToolsContents(c *gc.C, t *coretools.Tools, files []*coretesting.TarFile) {
79
80
        var wantNames []string
80
81
        for _, f := range files {
81
82
                wantNames = append(wantNames, f.Header.Name)