github.com/aporeto-inc/trireme-lib@v10.358.0+incompatible/monitor/internal/pod/config_test.go (about) 1 package podmonitor 2 3 import ( 4 "testing" 5 6 . "github.com/smartystreets/goconvey/convey" 7 ) 8 9 func TestConfig(t *testing.T) { 10 Convey("SetupDefaultConfig should just return the config as is", t, func() { 11 c := SetupDefaultConfig(&Config{ 12 Kubeconfig: "test", 13 Nodename: "test", 14 EnableHostPods: true, 15 MetadataExtractor: nil, 16 NetclsProgrammer: nil, 17 ResetNetcls: nil, 18 Workers: 6, 19 }) 20 So(c.Kubeconfig, ShouldEqual, "test") 21 So(c.Nodename, ShouldEqual, "test") 22 So(c.EnableHostPods, ShouldBeTrue) 23 So(c.MetadataExtractor, ShouldBeNil) 24 So(c.NetclsProgrammer, ShouldBeNil) 25 So(c.ResetNetcls, ShouldBeNil) 26 So(c.Workers, ShouldEqual, 6) 27 }) 28 29 Convey("DefaultConfig should always return a pointer to a config", t, func() { 30 c := DefaultConfig() 31 So(c, ShouldNotBeNil) 32 }) 33 }