github.com/juju/juju@v0.0.0-20240430160146-1752b71fcf00/cloudconfig/cloudinit/interface_test.go (about)

     1  // Copyright 2011, 2013, 2015 Canonical Ltd.
     2  // Copyright 2015 Cloudbase Solutions SRL
     3  // Licensed under the AGPLv3, see LICENCE file for details.
     4  
     5  package cloudinit
     6  
     7  import (
     8  	jc "github.com/juju/testing/checkers"
     9  	gc "gopkg.in/check.v1"
    10  )
    11  
    12  var _ CloudConfig = (*ubuntuCloudConfig)(nil)
    13  var _ CloudConfig = (*centOSCloudConfig)(nil)
    14  
    15  type InterfaceSuite struct{}
    16  
    17  var _ = gc.Suite(InterfaceSuite{})
    18  
    19  func (HelperSuite) TestNewCloudConfigWithoutMACMatch(c *gc.C) {
    20  	cfg, err := New("ubuntu", WithDisableNetplanMACMatch)
    21  	c.Assert(err, jc.ErrorIsNil)
    22  	c.Check(cfg.(*ubuntuCloudConfig).omitNetplanHWAddrMatch, jc.IsTrue)
    23  }