mmetc
7baa5d623b
pgx driver tests ( #1379 )
2022-03-23 11:13:23 +01:00
Manuel Sabban
6491100ef1
update license ( #1382 )
...
Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
2022-03-23 11:09:15 +01:00
mmetc
8df58df757
use secret for db passwords in tests ( #1381 )
2022-03-23 09:40:23 +01:00
Håvard Moen
42ff269bc8
add back dialect to handle pgx correctly ( #1376 )
2022-03-23 09:29:22 +01:00
mmetc
9d337bfb0e
fake machine-id in CI ( #1380 )
2022-03-22 12:33:36 +01:00
mmetc
0667552132
bats: postgres tests ( #1377 )
...
* split CI/bats in sqlite+mysql+mariadb+hub
* renamed db and user 'crowdsec' to 'crowdsec-test'; moved backend-specific scripts to lib/db, etc.
* postgres tests
* force delay between ipv6 tests (for myisam)
* force delay after pg_restore to ensure data is written
2022-03-21 15:51:05 +01:00
AlteredCoder
411baa4dcf
Improve cscli metrics units ( #1374 )
...
* Improve cscli metrics units
2022-03-21 12:13:36 +01:00
Manuel Sabban
b792c45921
Mysql enabled tests ( #1372 )
...
* add msyql backend test
Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
2022-03-18 17:36:51 +01:00
mmetc
c2708ab6c0
Bats: "reformat" script for shfmt, longer timeout for crowdsec ( #1373 )
2022-03-18 14:46:05 +01:00
mmetc
af8c55330d
[wip] bats changes for modular fixtures ( #1371 )
...
* target: tests/.environment.sh
* don't pass BIN_DIR around
* manage db backup/restore separately
* don't export CONFIG_DIR, DATA_DIR (derive path locations from
CONFIG_YAML); redirect stdout, stderr to &3 by default in setup_file,
teardown_file
2022-03-18 10:13:12 +01:00
Shivam Sandbhor
c5566e92f3
Fix 1262 pgsql conflict resolve ( #1363 )
...
* Fix api for all dbs (#1310 )
* DB agnostic lapi sanitize
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
* Update ent
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
* Fix go dep mess.
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2022-03-17 14:12:13 +01:00
mmetc
f7f4ca9541
use yq instead of envsubst ( #1366 )
2022-03-17 12:28:45 +01:00
mmetc
9a6a254a90
test decision list -m ( #1365 )
2022-03-17 12:20:08 +01:00
AlteredCoder
e4cc5fc997
Add -m flag for decisions list to display the machine ( #1361 )
...
* Add -m flag for decisions list to display the machine
2022-03-16 17:29:31 +01:00
Shivam Sandbhor
023ac9e138
Add trusted IPs which have admin API access ( #1352 )
...
* Add trusted IPs which have admin API access
2022-03-16 17:28:34 +01:00
AlteredCoder
b57eb92bbc
Allow to ignore errors when installing multiple configuration items ( #1359 )
...
* Allow to ignore errors when installing multiple configuration items
2022-03-16 17:27:30 +01:00
AlteredCoder
24797c1534
Allow cscli remove to remove with --all ( #1360 )
2022-03-16 17:26:31 +01:00
Shivam Sandbhor
42a1bc0260
Add query param to filter decisions by scenarios and origin ( #1294 )
...
* Add query param to filter decisions by scenarios
2022-03-16 14:37:42 +01:00
Shivam Sandbhor
bb30a3f966
Don't omit fields of bouncer in json ( #1354 )
...
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2022-03-16 09:40:34 +01:00
Thibault "bui" Koechlin
a74a41dac5
fix #1357 ( #1358 )
2022-03-16 09:40:00 +01:00
mmetc
81793fe8bf
dummy plugin ( #1342 )
2022-03-16 09:30:04 +01:00
Shivam Sandbhor
76e97303a5
Deprecate pid_file config ( #1346 )
...
* Deprecate pid_file config
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
* Fix unit test
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
* Impl review suggestions.
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2022-03-16 09:23:49 +01:00
Thibault "bui" Koechlin
548b0b5518
bit of doc + tests for lapi stream mode ( #1356 )
...
* bit of doc + tests for lapi stream mode
2022-03-15 17:16:33 +01:00
mmetc
b09339ae91
bats: check for yq version ( #1355 )
2022-03-15 15:03:56 +01:00
mmetc
6d42a8c8be
deduplicate make package, package_static ( #1344 )
2022-03-15 11:19:35 +01:00
mmetc
b050d27e20
bats changes to allow bouncer testing ( #1345 )
2022-03-15 10:40:01 +01:00
AlteredCoder
0dd37240a5
Display acquisition dir in cscli config show ( #1349 )
2022-03-14 18:28:31 +01:00
j-k
2cd3248431
refactor: use runtime rather than ldflags for go details ( #1302 )
2022-03-14 11:29:34 +01:00
Thibault "bui" Koechlin
6f68f4056e
fix #1316 : add html body ( #1339 )
...
* fix #1316 : add html body
2022-03-10 16:44:21 +01:00
mmetc
b6aca81ebd
allow "cscli completion..." without configuration file ( #1340 )
2022-03-10 14:57:14 +01:00
mmetc
8120fe7d5d
fix for /usr/bin/wc on freebsd ( #1338 )
...
* fix for /usr/bin/wc on freebsd
* check for python3 in bats-test
2022-03-10 13:59:10 +01:00
Manuel Sabban
bec231c1e6
Fix 1314 ( #1320 )
...
* fix https://github.com/crowdsecurity/crowdsec/issues/1314
* fix postinst logic
* fix in rpm as well
Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
2022-03-10 13:57:04 +01:00
mmetc
e7de05d6c9
don't set logger default level twice ( #1336 )
2022-03-10 13:56:46 +01:00
mmetc
aca37a38e7
return 1 with incomplete command line; always check error when calling cmd.Help ( #1335 )
2022-03-10 13:55:25 +01:00
mmetc
4e6b9597f8
fix for https://staticcheck.io/docs/checks#SA2002 ( #1334 )
2022-03-10 13:53:33 +01:00
Thibault "bui" Koechlin
52132ce398
fix #1157 ( #1327 )
2022-03-10 13:23:21 +01:00
mmetc
0c35263c29
fix bats-test for freebsd ( #1333 )
2022-03-10 12:19:02 +01:00
mmetc
c077668511
restore test_env.sh ( #1332 )
...
* restore test_env.sh, test 'make package' in CI
2022-03-10 09:28:42 +01:00
mmetc
7c0593c659
noop code removal, typos and lint fixes ( #1329 )
2022-03-09 16:15:18 +01:00
mmetc
59ad91a8ca
functional tests with bats-core ( #1266 )
2022-03-09 14:45:36 +01:00
mmetc
10ce45c054
allow notification plugins to work on freebsd and non-root functional tests ( #1253 )
...
* random uuid for all platforms
* check group writable and setgid; don't check group ownership
* allow user to run plugins without changing desired user/group (set them to "")
2022-03-09 12:09:50 +01:00
Thibault "bui" Koechlin
5a15f9b39b
bailout on incompatible duration format ( #1326 )
2022-03-08 18:18:36 +01:00
Chad Jones
19817083d1
Docker prestage - correct database directory ( #1312 )
2022-03-07 10:35:32 +01:00
Christophe Jauffret
a77b3e2690
Email notification plugin add sender_name option ( #1297 )
...
* add sender_name option
* default config and validation
2022-03-07 10:18:12 +01:00
mmetc
e35efc5b2d
fix check uid, gid values ( #1309 )
2022-03-07 10:16:34 +01:00
Thibault "bui" Koechlin
b66366c28c
Revert "Handle decisions with varying expiry for same IP ( #1262 )" ( #1308 )
...
This reverts commit e4f6cdfc14
.
2022-03-04 10:17:31 +01:00
mmetc
c5dda0ffba
fix: deny copy folder to itself or subpath ( #1299 )
2022-03-02 11:30:04 +01:00
Shivam Sandbhor
c3dbe0080c
Exit syslog acquis only after server is dead ( #1288 )
2022-03-01 11:32:28 +01:00
Thibault "bui" Koechlin
a300d5818f
fix #1295 : deploy email plugin on RPMs ( #1296 )
...
* fix #1295 : deploy email plugin on RPMs
2022-02-28 14:59:33 +01:00
Shivam Sandbhor
0f5e922851
Warn when log file in explain command is large. ( #1293 )
...
* Warn when log file in explain command is large.
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2022-02-28 14:57:59 +01:00