github.com/axw/juju@v0.0.0-20161005053422-4bd6544d08d4/state/backups/testing/suite.go (about) 1 // Copyright 2014 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package testing 5 6 import ( 7 "github.com/juju/testing" 8 gc "gopkg.in/check.v1" 9 10 "github.com/juju/juju/state/backups" 11 ) 12 13 // The base suite for backups testing. 14 type BaseSuite struct { 15 testing.IsolationSuite 16 // Meta is a Metadata with standard test values. 17 Meta *backups.Metadata 18 // Storage is a FileStorage to use when testing backups. 19 Storage *FakeStorage 20 } 21 22 func (s *BaseSuite) SetUpTest(c *gc.C) { 23 s.IsolationSuite.SetUpTest(c) 24 s.Meta = NewMetadata() 25 s.Storage = &FakeStorage{} 26 }