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

Side by Side Diff: worker/uniter/uniter_test.go

Issue 6489117: testing: add "series" argument to Repo methods.
Patch Set: testing: add "series" argument to Repo methods. Created 12 years, 7 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 | « worker/uniter/charm/deployer_test.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 package uniter_test 1 package uniter_test
2 2
3 import ( 3 import (
4 "bytes" 4 "bytes"
5 "crypto/sha256" 5 "crypto/sha256"
6 "encoding/hex" 6 "encoding/hex"
7 "fmt" 7 "fmt"
8 "io" 8 "io"
9 "io/ioutil" 9 "io/ioutil"
10 . "launchpad.net/gocheck" 10 . "launchpad.net/gocheck"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 c.Logf("%#v", s) 289 c.Logf("%#v", s)
290 s.step(c, ctx) 290 s.step(c, ctx)
291 } 291 }
292 292
293 type createCharm struct { 293 type createCharm struct {
294 revision int 294 revision int
295 badHooks []string 295 badHooks []string
296 } 296 }
297 297
298 func (s createCharm) step(c *C, ctx *context) { 298 func (s createCharm) step(c *C, ctx *context) {
299 » base := coretesting.Charms.ClonedDirPath(c.MkDir(), "dummy") 299 » base := coretesting.Charms.ClonedDirPath(c.MkDir(), "series", "dummy")
300 for _, name := range []string{"install", "start", "config-changed", "upg rade-charm"} { 300 for _, name := range []string{"install", "start", "config-changed", "upg rade-charm"} {
301 path := filepath.Join(base, "hooks", name) 301 path := filepath.Join(base, "hooks", name)
302 good := true 302 good := true
303 for _, bad := range s.badHooks { 303 for _, bad := range s.badHooks {
304 if name == bad { 304 if name == bad {
305 good = false 305 good = false
306 } 306 }
307 } 307 }
308 ctx.writeHook(c, path, good) 308 ctx.writeHook(c, path, good)
309 } 309 }
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 f func(*C, *context) 644 f func(*C, *context)
645 } 645 }
646 646
647 func (s custom) step(c *C, ctx *context) { 647 func (s custom) step(c *C, ctx *context) {
648 s.f(c, ctx) 648 s.f(c, ctx)
649 } 649 }
650 650
651 func curl(revision int) *charm.URL { 651 func curl(revision int) *charm.URL {
652 return charm.MustParseURL("cs:series/dummy").WithRevision(revision) 652 return charm.MustParseURL("cs:series/dummy").WithRevision(revision)
653 } 653 }
OLDNEW
« no previous file with comments | « worker/uniter/charm/deployer_test.go ('k') | no next file » | no next file with comments »

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