~themue/juju-core/053-env-more-script-friendly

« back to all changes in this revision

Viewing changes to environs/maas/maas_test.go

Merge trunk and resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package maas
 
2
 
 
3
import (
 
4
        . "launchpad.net/gocheck"
 
5
        "launchpad.net/gomaasapi"
 
6
        "testing"
 
7
)
 
8
 
 
9
func TestMAAS(t *testing.T) {
 
10
        TestingT(t)
 
11
}
 
12
 
 
13
type ProviderSuite struct {
 
14
        environ        *maasEnviron
 
15
        testMAASObject *gomaasapi.TestMAASObject
 
16
}
 
17
 
 
18
var _ = Suite(&ProviderSuite{})
 
19
 
 
20
func (s *ProviderSuite) SetUpSuite(c *C) {
 
21
        TestMAASObject := gomaasapi.NewTestMAAS("1.0")
 
22
        s.testMAASObject = TestMAASObject
 
23
        s.environ = &maasEnviron{name: "test env", maasClientUnlocked: &TestMAASObject.MAASObject}
 
24
}
 
25
 
 
26
func (s *ProviderSuite) TearDownTest(c *C) {
 
27
        s.testMAASObject.TestServer.Clear()
 
28
}
 
29
 
 
30
func (s *ProviderSuite) TearDownSuite(c *C) {
 
31
        s.testMAASObject.Close()
 
32
}