~rogpeppe/juju-core/438-local-instance-Addresses

« back to all changes in this revision

Viewing changes to charm/bundle_test.go

  • Committer: Gustavo Niemeyer
  • Date: 2011-09-24 15:21:23 UTC
  • Revision ID: gustavo@niemeyer.net-20110924152123-aytdvquwlbmnv3tj
Applied the juju/charm renaming to the Go code base.

Dropped need for the silly "header" field in metadata.yaml.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
package formula_test
 
1
package charm_test
2
2
 
3
3
import (
4
4
        //"archive/zip"
5
5
        "io/ioutil"
6
6
        . "launchpad.net/gocheck"
7
 
        "launchpad.net/ensemble/go/formula"
 
7
        "launchpad.net/juju/go/charm"
8
8
        "os"
9
9
        "path/filepath"
10
10
)
21
21
}
22
22
 
23
23
func (s BundleSuite) TestReadBundle(c *C) {
24
 
        bundle, err := formula.ReadBundle(s.bundlePath)
 
24
        bundle, err := charm.ReadBundle(s.bundlePath)
25
25
        c.Assert(err, IsNil)
26
26
        checkDummy(c, bundle, s.bundlePath)
27
27
}
30
30
        data, err := ioutil.ReadFile(s.bundlePath)
31
31
        c.Assert(err, IsNil)
32
32
 
33
 
        bundle, err := formula.ReadBundleBytes(data)
 
33
        bundle, err := charm.ReadBundleBytes(data)
34
34
        c.Assert(err, IsNil)
35
35
        checkDummy(c, bundle, "")
36
36
}
37
37
 
38
38
func (s BundleSuite) TestExpandTo(c *C) {
39
 
        bundle, err := formula.ReadBundle(s.bundlePath)
40
 
        path := filepath.Join(c.MkDir(), "formula")
 
39
        bundle, err := charm.ReadBundle(s.bundlePath)
 
40
        path := filepath.Join(c.MkDir(), "charm")
41
41
 
42
42
        err = bundle.ExpandTo(path)
43
43
        c.Assert(err, IsNil)
44
44
 
45
 
        dir, err := formula.ReadDir(path)
 
45
        dir, err := charm.ReadDir(path)
46
46
        c.Assert(err, IsNil)
47
47
        checkDummy(c, dir, path)
48
48
 
49
49
}
50
50
 
51
51
func bundleDir(c *C, dirpath string) (path string) {
52
 
        dir, err := formula.ReadDir(dirpath)
 
52
        dir, err := charm.ReadDir(dirpath)
53
53
        c.Assert(err, IsNil)
54
54
 
55
55
        path = filepath.Join(c.MkDir(), "bundle.charm")