pkg.re/essentialkaos/ek.10@v12.41.0+incompatible/netutil/netutil_darwin_test.go (about) 1 package netutil 2 3 // ////////////////////////////////////////////////////////////////////////////////// // 4 // // 5 // Copyright (c) 2022 ESSENTIAL KAOS // 6 // Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> // 7 // // 8 // ////////////////////////////////////////////////////////////////////////////////// // 9 10 import ( 11 "os" 12 "testing" 13 14 . "pkg.re/essentialkaos/check.v1" 15 ) 16 17 // ////////////////////////////////////////////////////////////////////////////////// // 18 19 func Test(t *testing.T) { TestingT(t) } 20 21 type NetUtilSuite struct{} 22 23 // ////////////////////////////////////////////////////////////////////////////////// // 24 25 var _ = Suite(&NetUtilSuite{}) 26 27 // ////////////////////////////////////////////////////////////////////////////////// // 28 29 func (s *NetUtilSuite) TestGetIP(c *C) { 30 c.Assert(GetIP(), Not(Equals), "") 31 } 32 33 func (s *NetUtilSuite) TestGetIP6(c *C) { 34 if os.Getenv("CI") == "" { 35 c.Assert(GetIP6(), Not(Equals), "") 36 } 37 }