mmetc
cd4dabde0e
silence yaml.local explicitly in cscli, keep in crowdsec/bouncer logs ( #1981 )
2023-01-11 09:50:46 +01:00
mmetc
c49c1cbf2a
fix alert context CI when feature flags are enabled ( #1979 )
2023-01-09 16:18:06 +01:00
AlteredCoder
185f9ad541
Alert context ( #1895 )
...
Co-authored-by: bui <thibault@crowdsec.net>
2023-01-04 16:50:02 +01:00
mmetc
899f3e7eb8
func tests: redirect stderr to filter extra logs ( #1961 )
2022-12-30 15:57:24 +01:00
mmetc
ef3a130d54
Cscli config refactoring ( #1934 )
2022-12-22 12:22:55 +01:00
mmetc
a32aa96752
feature flags ( #1933 )
...
Package fflag provides a simple feature flag system.
Feature names are lowercase and can only contain letters, numbers, undercores
and dots.
good: "foo", "foo_bar", "foo.bar"
bad: "Foo", "foo-bar"
A feature flag can be enabled by the user with an environment variable
or by adding it to {ConfigDir}/feature.yaml
I.e. CROWDSEC_FEATURE_FOO_BAR=true
or in feature.yaml:
```
---
- foo_bar
```
If the variable is set to false, the feature can still be enabled
in feature.yaml. Features cannot be disabled in the file.
A feature flag can be deprecated or retired. A deprecated feature flag is
still accepted but a warning is logged. A retired feature flag is ignored
and an error is logged.
A specific deprecation message is used to inform the user of the behavior
that has been decided when the flag is/was finally retired.
2022-12-20 16:11:51 +01:00
mmetc
fd3e668fe1
add -error flag to crowdsec binary ( #1903 )
2022-12-03 08:56:11 +01:00
mmetc
3beb84bcfe
print missing "AS" values as empty strings instead of "0 " ( #1867 )
2022-11-14 09:55:53 +01:00
mmetc
344b1dc559
fixed package tests w/wal, gitignore/typos ( #1849 )
2022-10-31 10:02:51 +01:00
Thibault "bui" Koechlin
23ffa1e04f
add cscli alerts delete --id
( #1843 )
...
* add cscli alerts delete by id
* test added for cscli delete alert --id
Co-authored-by: Marco Mariani <marco@crowdsec.net>
2022-10-27 09:07:53 +02:00
mmetc
e545933923
fix(cscli): correct and test the behavior of "cscli collections delete" ( #1824 )
2022-10-25 14:10:51 +02:00
mmetc
2b7e3ff1e7
warn if no acquisition files are found, acquisition_test refactoring, tests ( #1816 )
2022-10-17 17:32:08 +02:00
mmetc
708fa8280a
add test and fix for configuration reload ( #1808 )
...
fix reload issue by returning new configuration to the signal loop
example: run crowdsec, disable agent in the config file, reload config.
Now there is no agent but the signal loop believes there is, so
triggering a reload configuration again will make the process hang
forever.
This commit updates the configuration in the signal loop with the one
returned by the signal handler.
2022-10-14 15:48:41 +02:00
Shivam Sandbhor
74659a82ab
Fast bulk alert delete ( #1791 )
2022-10-07 12:40:30 +02:00
mmetc
ddd75eae9a
cscli: new tables, --color yes|no|auto option ( #1763 )
2022-10-07 11:05:35 +02:00
mmetc
af30ba0e3b
tests/bin cleanup ( #1760 )
2022-10-04 15:58:10 +02:00
blotus
e46ca38cbb
add cscli support dump
( #1634 )
2022-08-18 11:54:01 +02:00
mmetc
6b18674960
func tests: enable capi only when needed ( #1710 )
2022-08-16 10:17:21 +02:00
mmetc
15a9e16530
functional tests: json, stderr helpers ( #1704 )
2022-08-05 10:54:49 +02:00
mmetc
bd3722f075
Ansible testing improvements ( #1700 )
2022-08-04 11:25:34 +02:00
mmetc
c742242094
Ansible testing ( #1691 )
2022-07-29 10:34:03 +02:00
AlteredCoder
1002affc16
cscli machines delete: return an error if machines doesn't exist ( #1689 )
...
* cscli machines delete: return an error if machines doesn't exist
2022-07-28 17:32:12 +02:00
AlteredCoder
16b1ab06a9
Add -a options in cscli alerts list ( #1690 )
...
* Add -a options in cscli alerts list
2022-07-28 17:31:53 +02:00
mmetc
804b6f4c5d
adjust test timing for slow boxes ( #1681 )
2022-07-26 09:47:56 +02:00
mmetc
e1954adc32
test machines_tls: remove all existing machines in setup ( #1678 )
2022-07-22 14:21:05 +02:00
mmetc
496dacb7ff
tls tests with bundle.pem ( #1671 )
2022-07-21 13:03:46 +02:00
mmetc
fa35e8c0ba
removed: realpath -s (does not exist on freebsd) ( #1656 )
2022-07-13 10:10:08 +02:00
Thibault "bui" Koechlin
73f336363a
bump log level when overloading config file with .local
( #1646 )
...
* bump log level
Co-authored-by: Marco Mariani <marco@crowdsec.net>
2022-07-08 09:29:23 +02:00
mmetc
e05515f79d
disable capi for tests by default ( #1633 )
2022-07-04 11:26:39 +02:00
mmetc
e868adee2f
config_get, config_set test helpers ( #1632 )
2022-07-01 22:45:55 +02:00
AlteredCoder
5f62d738fc
Add no-capi flag and review some logs ( #1628 )
...
* Add no-capi flag and review some logs
2022-07-01 16:56:13 +02:00
mmetc
14dd6b9026
disable tls tests in pipeline ( #1625 )
...
and removing obsolete $FILE
2022-07-01 11:03:40 +02:00
mmetc
69dd8d2892
fix some tests in pipeline ( #1622 )
2022-07-01 10:16:45 +02:00
mmetc
8e7e799304
[wip] serve metrics only after agent and/or lapi are ready; fixed some func tests ( #1613 )
2022-06-24 15:55:21 +02:00
Marco Mariani
4be884824f
Revert "fixed tls tests"
...
This reverts commit 520e40db37
.
2022-06-24 13:57:44 +02:00
Marco Mariani
520e40db37
fixed tls tests
2022-06-24 13:55:58 +02:00
Thibault "bui" Koechlin
a6ed08b239
Add alerts and decisions metrics, LAPI and agent timing prom metrics ( #1546 )
2022-06-22 11:14:34 +02:00
AlteredCoder
0a39066f9d
Fix #1552 ( #1569 )
2022-06-22 10:29:02 +02:00
mmetc
b91fcb8e9b
Fixed bats tests for freebsd ( #1600 )
2022-06-22 10:00:51 +02:00
mmetc
c78c833400
CI: colored test output, colored crowdsec and crowdsec-api logs, full final db dump for mysql and sqlite ( #1596 )
...
* github-ci: color unit test output and logs
* new config option: force_color_logs (useful in CI)
* bats: show sqlite/mysql dump at the end
* removed "-v" (print package names) from "go build"
* general workflow cleanup
2022-06-17 16:12:49 +02:00
mmetc
67841d54ee
updated bats to 1.7.0; shellcheck fixes and moved cfssl dir under testdata/ ( #1584 )
2022-06-13 21:54:47 +02:00
Thibault "bui" Koechlin
1c0fe09576
Add support for certificate authentication for agents and bouncers ( #1428 )
2022-06-08 16:05:52 +02:00
mmetc
799cc82bb5
functional tests, minor refactoring and lint/cleanup ( #1570 )
...
* cmd/crowdsec: removed log.Fatal()s, added tests and print error for unrecognized argument
* updated golangci-lint to v1.46
* lint/deadcode: fix existing issues
* tests: cscli config backup/restore
* tests: cscli completion powershell/fish
* err check: pflags MarkHidden()
* empty .dockerignore (and explain the reason)
* tests, errors.Wrap
* test for CS_LAPI_SECRET and minor refactoring
* minor style changes
* log cleanup
2022-06-06 15:24:48 +02:00
mmetc
df7c51f34e
fixed coverage reporting for functional tests; added cscli ( #1568 )
2022-05-31 10:01:30 +02:00
mmetc
4b843d145a
cscli: avoid double output (error + log fatal) and automatic --help after each error ( #1536 )
2022-05-19 13:42:44 +02:00
mmetc
cdab206d05
tests for misconfigured plugins ( #1534 )
2022-05-19 13:27:24 +02:00
mmetc
9c1c4093a3
func test: replaced one-shot bin/nc with a loop ( #1542 )
2022-05-19 10:51:45 +02:00
mmetc
131ed1b0a7
error reporting ( #1501 )
...
* unified error reporting, removed redundancy, tests
2022-05-19 10:48:08 +02:00
mmetc
7c7fe70cb2
test multiple notification events with the same plugin ( #1539 )
2022-05-19 09:54:26 +02:00
mmetc
98f2ac5e7c
fix #1385 : .yaml.local ( #1497 )
...
Added support for .yaml.local files to override values in .yaml
2022-05-18 10:08:37 +02:00