~dave-cheney/juju-core/102-cmd-init-context

« back to all changes in this revision

Viewing changes to juju/deploy_test.go

testing: add "series" argument to Repo methods.

R=niemeyer
CC=
https://codereview.appspot.com/6489117

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
}
49
49
 
50
50
func (s *DeploySuite) TestPutCharmBasic(c *C) {
51
 
        curl := testing.Charms.ClonedURL(s.repo.Path, "riak")
 
51
        curl := testing.Charms.ClonedURL(s.repo.Path, "series", "riak")
52
52
        curl.Revision = -1 // make sure we trigger the repo.Latest logic.
53
53
        sch, err := s.conn.PutCharm(curl, s.repo, false)
54
54
        c.Assert(err, IsNil)
67
67
        w, err := os.Create(filepath.Join(dir, "riak.charm"))
68
68
        c.Assert(err, IsNil)
69
69
        defer w.Close()
70
 
        charmDir := testing.Charms.Dir("riak")
 
70
        charmDir := testing.Charms.Dir("series", "riak")
71
71
        err = charmDir.BundleTo(w)
72
72
        c.Assert(err, IsNil)
73
73
 
91
91
 
92
92
func (s *DeploySuite) TestPutCharmUpload(c *C) {
93
93
        repo := &charm.LocalRepository{c.MkDir()}
94
 
        curl := testing.Charms.ClonedURL(repo.Path, "riak")
 
94
        curl := testing.Charms.ClonedURL(repo.Path, "series", "riak")
95
95
 
96
96
        // Put charm for the first time.
97
97
        sch, err := s.conn.PutCharm(curl, repo, false)
131
131
}
132
132
 
133
133
func (s *DeploySuite) TestAddService(c *C) {
134
 
        curl := testing.Charms.ClonedURL(s.repo.Path, "riak")
 
134
        curl := testing.Charms.ClonedURL(s.repo.Path, "series", "riak")
135
135
        sch, err := s.conn.PutCharm(curl, s.repo, false)
136
136
        c.Assert(err, IsNil)
137
137
 
153
153
}
154
154
 
155
155
func (s *DeploySuite) TestAddServiceDefaultName(c *C) {
156
 
        curl := testing.Charms.ClonedURL(s.repo.Path, "riak")
 
156
        curl := testing.Charms.ClonedURL(s.repo.Path, "series", "riak")
157
157
        sch, err := s.conn.PutCharm(curl, s.repo, false)
158
158
        c.Assert(err, IsNil)
159
159
 
163
163
}
164
164
 
165
165
func (s *DeploySuite) TestAddUnits(c *C) {
166
 
        curl := testing.Charms.ClonedURL(s.repo.Path, "riak")
 
166
        curl := testing.Charms.ClonedURL(s.repo.Path, "series", "riak")
167
167
        sch, err := s.conn.PutCharm(curl, s.repo, false)
168
168
        c.Assert(err, IsNil)
169
169
        svc, err := s.conn.AddService("testriak", sch)