Ubuntu Pastebin

Paste from babbageclunk at Fri, 30 Sep 2016 16:10:13 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
diff --git a/testcharms/charm.go b/testcharms/charm.go
index 0d665b5..e2fbc65 100644
--- a/testcharms/charm.go
+++ b/testcharms/charm.go
@@ -113,6 +113,14 @@ func UploadBundle(c *gc.C, client *csclient.Client, url, name string) (*charm.UR
                id.User = "who"
                promulgatedRevision = id.Revision
        }
+       // V3 urls might not include the bundle pseudo-series.
+       if id.Series != "bundle" {
+               if id.Series != "" {
+                       panic(`bundle url series must be "" or "bundle"`)
+               }
+               id.Series = "bundle"
+       }
+
        b := Repo.BundleArchive(c.MkDir(), name)
 
        // Upload the bundle.
Download as text