github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/provider/dummy/environs_whitebox_test.go (about)

     1  // Copyright 2017 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package dummy
     5  
     6  import (
     7  	"github.com/juju/errors"
     8  	jc "github.com/juju/testing/checkers"
     9  	gc "gopkg.in/check.v1"
    10  
    11  	"github.com/juju/juju/environs"
    12  	"github.com/juju/juju/environs/context"
    13  )
    14  
    15  var (
    16  	_ environs.NetworkingEnviron = (*environ)(nil)
    17  )
    18  
    19  var _ = gc.Suite(&environWhiteboxSuite{})
    20  
    21  type environWhiteboxSuite struct{}
    22  
    23  func (s *environWhiteboxSuite) TestSupportsContainerAddresses(c *gc.C) {
    24  	callCtx := context.NewCloudCallContext()
    25  	// For now this is a static method so we can use a nil environ
    26  	var env *environ
    27  	supported, err := env.SupportsContainerAddresses(callCtx)
    28  	c.Check(err, jc.Satisfies, errors.IsNotSupported)
    29  	c.Check(supported, jc.IsFalse)
    30  	c.Check(environs.SupportsContainerAddresses(callCtx, env), jc.IsFalse)
    31  }