github.com/aporeto-inc/trireme-lib@v10.358.0+incompatible/monitor/extractors/windows_test.go (about) 1 // +build windows 2 3 package extractors 4 5 import ( 6 "testing" 7 8 . "github.com/smartystreets/goconvey/convey" 9 "go.aporeto.io/enforcerd/trireme-lib/common" 10 ) 11 12 func TestWindowsServiceEventMetadataExtractor(t *testing.T) { 13 14 Convey("When I call the windows metadata extrator", t, func() { 15 16 Convey("If all data are present", func() { 17 event := &common.EventInfo{ 18 Name: "./testdata/curl", 19 Executable: "./testdata/curl", 20 PID: 1234, 21 PUID: "/1234", 22 Tags: []string{"app=web"}, 23 } 24 25 pu, err := WindowsServiceEventMetadataExtractor(event) 26 Convey("I should get no error and a valid PU runitime", func() { 27 So(err, ShouldBeNil) 28 So(pu, ShouldNotBeNil) 29 }) 30 }) 31 }) 32 }