github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/api/agent/model_test.go (about)

     1  // Copyright 2014 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package agent_test
     5  
     6  import (
     7  	gc "gopkg.in/check.v1"
     8  
     9  	"github.com/juju/juju/api/agent"
    10  	apitesting "github.com/juju/juju/api/testing"
    11  	jujutesting "github.com/juju/juju/juju/testing"
    12  )
    13  
    14  type modelSuite struct {
    15  	jujutesting.JujuConnSuite
    16  	*apitesting.ModelWatcherTests
    17  }
    18  
    19  var _ = gc.Suite(&modelSuite{})
    20  
    21  func (s *modelSuite) SetUpTest(c *gc.C) {
    22  	s.JujuConnSuite.SetUpTest(c)
    23  
    24  	stateAPI, _ := s.OpenAPIAsNewMachine(c)
    25  
    26  	agentAPI := agent.NewState(stateAPI)
    27  	c.Assert(agentAPI, gc.NotNil)
    28  
    29  	s.ModelWatcherTests = apitesting.NewModelWatcherTests(
    30  		agentAPI, s.BackingState, apitesting.NoSecrets)
    31  }