Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1271)

Side by Side Diff: charm/repo_test.go

Issue 54230044: state: deprecate JobManageState
Patch Set: state: deprecate JobManageState Created 11 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « [revision details] ('k') | cmd/juju/status_test.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012, 2013 Canonical Ltd. 1 // Copyright 2012, 2013 Canonical Ltd.
2 // Licensed under the AGPLv3, see LICENCE file for details. 2 // Licensed under the AGPLv3, see LICENCE file for details.
3 3
4 package charm_test 4 package charm_test
5 5
6 import ( 6 import (
7 "fmt" 7 "fmt"
8 "io/ioutil" 8 "io/ioutil"
9 "os" 9 "os"
10 "path/filepath" 10 "path/filepath"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 func (s *StoreSuite) TestInfoWarning(c *gc.C) { 182 func (s *StoreSuite) TestInfoWarning(c *gc.C) {
183 charmURL := charm.MustParseURL("cs:series/unwise") 183 charmURL := charm.MustParseURL("cs:series/unwise")
184 info, err := s.store.Info(charmURL) 184 info, err := s.store.Info(charmURL)
185 c.Assert(err, gc.IsNil) 185 c.Assert(err, gc.IsNil)
186 c.Assert(info, gc.HasLen, 1) 186 c.Assert(info, gc.HasLen, 1)
187 c.Assert(info[0].Warnings, gc.DeepEquals, []string{"foolishness"}) 187 c.Assert(info[0].Warnings, gc.DeepEquals, []string{"foolishness"})
188 } 188 }
189 189
190 func (s *StoreSuite) TestInfoDNSError(c *gc.C) { 190 func (s *StoreSuite) TestInfoDNSError(c *gc.C) {
191 » store := charm.NewStore("http://example.invalid") 191 » store := charm.NewStore("http://0.1.2.3")
192 charmURL := charm.MustParseURL("cs:series/good") 192 charmURL := charm.MustParseURL("cs:series/good")
193 resp, err := store.Info(charmURL) 193 resp, err := store.Info(charmURL)
194 c.Assert(resp, gc.IsNil) 194 c.Assert(resp, gc.IsNil)
195 expect := `Cannot access the charm store. Are you connected to the inter net. Error details:.*` 195 expect := `Cannot access the charm store. Are you connected to the inter net. Error details:.*`
196 c.Assert(err, gc.ErrorMatches, expect) 196 c.Assert(err, gc.ErrorMatches, expect)
197 } 197 }
198 198
199 func (s *StoreSuite) TestEvent(c *gc.C) { 199 func (s *StoreSuite) TestEvent(c *gc.C) {
200 charmURL := charm.MustParseURL("cs:series/good") 200 charmURL := charm.MustParseURL("cs:series/good")
201 event, err := s.store.Event(charmURL, "") 201 event, err := s.store.Event(charmURL, "")
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 480
481 func (s *LocalRepoSuite) TestFindsSymlinks(c *gc.C) { 481 func (s *LocalRepoSuite) TestFindsSymlinks(c *gc.C) {
482 realPath := testing.Charms.ClonedDirPath(c.MkDir(), "dummy") 482 realPath := testing.Charms.ClonedDirPath(c.MkDir(), "dummy")
483 linkPath := filepath.Join(s.seriesPath, "dummy") 483 linkPath := filepath.Join(s.seriesPath, "dummy")
484 err := os.Symlink(realPath, linkPath) 484 err := os.Symlink(realPath, linkPath)
485 c.Assert(err, gc.IsNil) 485 c.Assert(err, gc.IsNil)
486 ch, err := s.repo.Get(charm.MustParseURL("local:quantal/dummy")) 486 ch, err := s.repo.Get(charm.MustParseURL("local:quantal/dummy"))
487 c.Assert(err, gc.IsNil) 487 c.Assert(err, gc.IsNil)
488 checkDummy(c, ch, linkPath) 488 checkDummy(c, ch, linkPath)
489 } 489 }
OLDNEW
« no previous file with comments | « [revision details] ('k') | cmd/juju/status_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b