~juju-qa/ubuntu/xenial/juju/xenial-2.0-beta3

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/api/backups/download_test.go

  • Committer: Martin Packman
  • Date: 2016-03-30 19:31:08 UTC
  • mfrom: (1.1.41)
  • Revision ID: martin.packman@canonical.com-20160330193108-h9iz3ak334uk0z5r
Merge new upstream source 2.0~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 
13
13
        "github.com/juju/juju/apiserver/params"
14
14
        "github.com/juju/juju/state/backups"
 
15
        "github.com/juju/juju/testing"
15
16
)
16
17
 
17
18
type downloadSuite struct {
28
29
        r := strings.NewReader("<compressed archive data>")
29
30
        meta, err := backups.NewMetadataState(s.State, "0")
30
31
        c.Assert(err, jc.ErrorIsNil)
 
32
        c.Assert(meta.CACert, gc.Equals, testing.CACert)
 
33
        c.Assert(meta.CAPrivateKey, gc.Equals, testing.CAKey)
31
34
        // The Add method requires the length to be set
32
35
        // otherwise the content is assumed to have length 0.
33
36
        meta.Raw.Size = int64(r.Len())