Commit graph

809 commits

Author SHA1 Message Date
alteredCoder eb0fb243a3 display context with alert 2022-04-15 15:55:03 +02:00
alteredCoder 186d5c3aa5 update 2022-04-15 15:55:03 +02:00
alteredCoder ac16db5f21 update 2022-04-15 15:55:03 +02:00
alteredCoder ab525fff6a update 2022-04-15 15:55:03 +02:00
alteredCoder f96cb2a70d udpate 2022-04-15 15:55:03 +02:00
alteredCoder 4f80e889d4 update 2022-04-15 15:55:03 +02:00
alteredCoder 1831a27600 first iteration 2022-04-15 15:55:03 +02:00
Manuel Sabban 37756e8082
improve test packaging (#1443)
* improve tests for packaging

Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
Co-authored-by: mmetc <92726601+mmetc@users.noreply.github.com>
2022-04-15 15:39:17 +02:00
Shivam Sandbhor 4a3ec85686
Update bouncer pull in rupture mode (#1445)
* Update bouncer pull in rupture mode

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2022-04-15 12:24:01 +02:00
mmetc b3786961de
removed RELEASE.json, embed codename in makefile (#1442) 2022-04-14 13:51:25 +02:00
AlteredCoder 71165bcd30
Send all installed scenario to LAPI (#1277) 2022-04-13 17:48:29 +02:00
mmetc 5f2797c83c
more func test coverage; capture exit code for bincover (#1425) 2022-04-13 15:44:23 +02:00
mmetc 17ed27052c
save fixture with community data (#1440) 2022-04-13 15:17:49 +02:00
mmetc 0190614342
show crowdsec logs after the tests (#1439) 2022-04-13 15:03:37 +02:00
AlteredCoder 099469c5d2
Fix hub loader to support '.yml' files (#1433) 2022-04-11 16:13:20 +02:00
Shivam Sandbhor a8089c8ddb
Add origins param in decision stream service (#1429)
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2022-04-07 12:40:27 +02:00
blotus a0a5776e51
remove trailing from cp in make release (#1416) 2022-04-07 10:49:55 +02:00
mmetc bf4bc0c9fc
single workflow for all tests, with bats coverage (#1413) 2022-04-05 11:00:11 +02:00
blotus 9cf2d5ab5c
handle containers with TTY in docker acquis (#1422) 2022-04-05 10:31:36 +02:00
mmetc 1e63727064
int64 for metric units (#1419) 2022-04-04 21:50:19 +02:00
mmetc 7e36432bf5
use golangci-lint 1.45.2 (#1420) 2022-04-04 21:16:18 +02:00
Adam 33ef6eaea6
Register bouncers on container init (#1341)
* Register bounces on init
2022-04-04 10:18:44 +02:00
Thibault "bui" Koechlin ba7f4fcec0
make this info level (#1409)
* make this info level
2022-04-01 15:31:33 +02:00
mmetc c54c9f2951
skip broken tests (w/ postgres and test coverage) (#1410) 2022-04-01 15:03:17 +02:00
mmetc 058237c9dd
install *.cover binaries in $BIN_DIR; minor workflow changes (#1408) 2022-04-01 14:12:03 +02:00
mmetc dad22a6aba
instrument main() for tests (#1399) 2022-04-01 11:17:45 +02:00
mmetc b202e387cf
fix "cscli" without arguments (#1406) 2022-03-31 16:50:38 +02:00
Thibault "bui" Koechlin cea793fc3a
cleanup mess (#1401) 2022-03-30 16:11:27 +02:00
Thibault "bui" Koechlin ec5587a734
Merge branch 'master' into master 2022-03-30 16:05:32 +02:00
Manuel Sabban b076f1d582
allow DB_BACKEND to be expanded (#1400)
* allow DB_BACKEND to be expanded

Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
2022-03-30 11:33:26 +02:00
Manuel Sabban 16b9fd82f0
Update bats tests to work with systemd (#1394)
* update for making it work with systemd
* take DB_BACKEND from file name; reduce duplicated code; configure db_type=sqlite
* define PACKAGE_TESTING

Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
Co-authored-by: mmetc <92726601+mmetc@users.noreply.github.com>
2022-03-29 17:06:49 +02:00
Thibault "bui" Koechlin d8dc01cd94
Revamp unit tests (#1368)
* Revamp unit tests
* Increase coverage
* Use go-acc to get cross packages coverage

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2022-03-29 14:20:26 +02:00
mmetc 3f24bcdbcf
pg tests: pass now, waiting for fix (#1393)
* PG* variable names
* take DB_BACKEND from file name; reduce duplicated code; configure db_type=sqlite
2022-03-28 10:41:32 +02:00
mmetc 2f18808d68
print db logs after tests (#1390) 2022-03-25 12:17:28 +01:00
mmetc 7329a9d4b2
mysql test: delays in strem test (#1387) 2022-03-24 14:50:52 +01:00
mmetc aef62f74f8
remove make warning "building for linux" (#1389) 2022-03-24 14:23:51 +01:00
Manuel Sabban 2c4edac28b
update rpm patch to allow build again (#1388)
Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
2022-03-24 12:42:40 +01:00
mmetc caf1dc71fb
allow capi register in functional tests (#1384) 2022-03-24 11:07:54 +01:00
mmetc 7ff67c2311
mysql tests: silence password warnings (#1386) 2022-03-24 09:22:11 +01:00
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