github.com/wynshop-open-source/gomplate@v3.5.0+incompatible/tests/integration/net_test.go (about)

     1  //+build integration
     2  
     3  package integration
     4  
     5  import (
     6  	. "gopkg.in/check.v1"
     7  
     8  	"github.com/gotestyourself/gotestyourself/icmd"
     9  )
    10  
    11  type NetSuite struct{}
    12  
    13  var _ = Suite(&NetSuite{})
    14  
    15  func (s *NetSuite) TestLookupIP(c *C) {
    16  	result := icmd.RunCommand(GomplateBin, "-i", `{{ net.LookupIP "localhost" }}`)
    17  	result.Assert(c, icmd.Expected{ExitCode: 0, Out: "127.0.0.1"})
    18  }