Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update go-cs-bouncer, go-cs-lib dependency #76

Merged
merged 3 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,15 @@ func Execute() error {

log.Infof("Starting %s %s", name, version.String())

if err = custom.Init(); err != nil {
return err
}

if *testConfig {
log.Info("config is valid")
return nil
}

if err = custom.Init(); err != nil {
return err
}

defer bouncerShutdown(custom)

bouncer := &csbouncer.StreamBouncer{}
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.20
require (
github.com/coreos/go-systemd/v22 v22.5.0
github.com/crowdsecurity/crowdsec v1.5.2
github.com/crowdsecurity/go-cs-bouncer v0.0.6
github.com/crowdsecurity/go-cs-lib v0.0.0-20230522124854-671e895fa788
github.com/crowdsecurity/go-cs-bouncer v0.0.7
github.com/crowdsecurity/go-cs-lib v0.0.2
github.com/prometheus/client_golang v1.15.1
github.com/sirupsen/logrus v1.9.2
golang.org/x/sync v0.2.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/crowdsecurity/crowdsec v1.5.2 h1:2wl5ULsZlD8Du9PGe415x1fYRcOfVx95KI2Si0Qeb98=
github.com/crowdsecurity/crowdsec v1.5.2/go.mod h1:R1wnz8wqV4r1teYt9Yc5PVTaBb37ug2yqCffIvXEuRw=
github.com/crowdsecurity/go-cs-bouncer v0.0.6 h1:vzHMPBVcAKH77P/93Q69pTQgYbwBJEMnrg6BxtOaM6c=
github.com/crowdsecurity/go-cs-bouncer v0.0.6/go.mod h1:ShrcSSYmzBTKnpqON9/UFvorDMhhn5mbeQC2HXCv7kE=
github.com/crowdsecurity/go-cs-lib v0.0.0-20230522124854-671e895fa788 h1:1tjqkYUmbkbYqa21kZsgSWaPIwGyUW0xE/sbb1zpJHg=
github.com/crowdsecurity/go-cs-lib v0.0.0-20230522124854-671e895fa788/go.mod h1:9JJLSpGj1ZXnROV3xAcJvS/HTaUvuA8K3gGOpO4tfVc=
github.com/crowdsecurity/go-cs-bouncer v0.0.7 h1:uA2iTwiqZ6hDWONqjQI4uF5r2daGGCMEPtuW1DQGqug=
github.com/crowdsecurity/go-cs-bouncer v0.0.7/go.mod h1:ShrcSSYmzBTKnpqON9/UFvorDMhhn5mbeQC2HXCv7kE=
github.com/crowdsecurity/go-cs-lib v0.0.2 h1:+Tjmf/IclOXNzU9sxKVQvUl9CkMfbM60xQ0zA05NWps=
github.com/crowdsecurity/go-cs-lib v0.0.2/go.mod h1:iznTJ19qLTYdZBcRb5RVDlcUdSlayBCivBkWsXlOY3g=
github.com/crowdsecurity/grokky v0.2.1 h1:t4VYnDlAd0RjDM2SlILalbwfCrQxtJSMGdQOR0zwkE4=
github.com/crowdsecurity/grokky v0.2.1/go.mod h1:33usDIYzGDsgX1kHAThCbseso6JuWNJXOzRQDGXHtWM=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
4 changes: 2 additions & 2 deletions test/bouncer/test_custom_bouncer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_no_api_key(crowdsec, bouncer, cb_stream_cfg_factory):
cfg = cb_stream_cfg_factory()
with bouncer(cfg) as cb:
cb.wait_for_lines_fnmatch([
"*unable to configure bouncer: config does not contain LAPI key or certificate*",
"*config does not contain LAPI key or certificate*",
])
cb.proc.wait()
assert not cb.proc.is_running()
Expand All @@ -26,7 +26,7 @@ def test_no_api_key(crowdsec, bouncer, cb_stream_cfg_factory):

with bouncer(cfg) as cb:
cb.wait_for_lines_fnmatch([
"*unable to configure bouncer: config does not contain LAPI key or certificate*",
"*config does not contain LAPI key or certificate*",
])
cb.proc.wait()
assert not cb.proc.is_running()
Expand Down
2 changes: 1 addition & 1 deletion test/bouncer/test_yaml_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def test_yaml_local(bouncer, cb_stream_cfg_factory):

with bouncer(cfg) as cb:
cb.wait_for_lines_fnmatch([
"*unable to configure bouncer: config does not contain LAPI key or certificate*",
"*config does not contain LAPI key or certificate*",
])
cb.proc.wait(timeout=0.2)
assert not cb.proc.is_running()
Expand Down