don't log notification error if not running under systemd (#2274)

This commit is contained in:
mmetc 2023-06-08 15:04:48 +02:00 committed by GitHub
parent 5b3200173e
commit 8da9d5eefd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 10 deletions

View file

@ -10,6 +10,7 @@ import (
"github.com/lithammer/dedent"
"github.com/stretchr/testify/require"
"github.com/crowdsecurity/go-cs-lib/pkg/csstring"
"github.com/crowdsecurity/go-cs-lib/pkg/cstest"
"github.com/crowdsecurity/crowdsec/pkg/setup"
@ -1007,7 +1008,7 @@ func TestDetectDatasourceValidation(t *testing.T) {
"DetectYaml": detectYaml,
}
expectedErr, err := cstest.Interpolate(tc.expectedErr, data)
expectedErr, err := csstring.Interpolate(tc.expectedErr, data)
require.NoError(err)
detected, err := setup.Detect(detectYaml, setup.DetectOptions{})