Commit graph

149 commits

Author SHA1 Message Date
mmetc
2b7f6b2b84
force postgres 14 for func tests (#1813)
the postgres 15 image (released two days ago) has a permission issue. proper fix will follow
2022-10-17 09:21:55 +02:00
mmetc
8fecc2c00b
enable staticcheck linter; fixes (#1806)
- explicitly ignore returned parameters
 - replace Walk with faster WalkDir
 - log path error during hub dir sync
 - colorize static unit tests
 - removed duplicate import in crowdsec/main.go
 - typos
 - func tests: default datasource in tests/var/log instead of /tmp
 - action setup-go v3
2022-10-14 16:12:21 +02:00
AlteredCoder
b95a67751e
Update ent and grokky package (#1772)
* Update ent and grokky package
2022-10-06 14:55:42 +02:00
mmetc
af30ba0e3b
tests/bin cleanup (#1760) 2022-10-04 15:58:10 +02:00
blotus
bfbe180101
Tighten windows sqlite database permissions (#1769) 2022-09-28 16:18:00 +02:00
mmetc
52fbda1a5e
simpler makefiles for static targets (#1744) 2022-09-14 14:22:57 +02:00
mmetc
414282a2c9
golangci-lint 1.49 and related fixes (#1736) 2022-09-06 13:55:03 +02:00
mmetc
c4652d60a7
hardcode db password in CI to allow tests from third parties (#1729) 2022-09-01 16:49:12 +02:00
he2ss
ea40ffd655
Datasource/kafka (#1698)
* add Kafka datasource
2022-08-30 17:03:45 +02:00
blotus
1f5224b74b
switch to go 1.19 (#1709) 2022-08-26 13:31:49 +02:00
mmetc
eea07b7a1a
golangci-lint v1.48 and fixes for "usestdlibvars" (#1711) 2022-08-16 09:46:10 +02:00
blotus
3adb90e7b7
do not hide unit test failure (#1677) 2022-07-22 10:59:23 +02:00
Thibault "bui" Koechlin
0a372d83b9
fix again (#1641) 2022-07-06 14:34:39 +02:00
Thibault "bui" Koechlin
5e80bf3043
up (#1640) 2022-07-06 14:04:33 +02:00
Thibault "bui" Koechlin
9739de61b0
rename (#1639) 2022-07-06 13:58:03 +02:00
Thibault "bui" Koechlin
134ac2e68c
Issues templates improvements (#1629)
* add security.md
* add metrics and config show
2022-07-06 13:53:30 +02:00
mmetc
b1cbf2e2e5
fix build/test badge (#1626) 2022-07-01 12:19:21 +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
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
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
1fc9587919
fix #1283: update and enable error reports from golangci (#1523) 2022-05-25 22:27:50 +02:00
mmetc
d199223be0
update codeql actions (v1 is going to be deprecated) (#1563) 2022-05-25 10:06:22 +02:00
mmetc
8ea9e83798
Codecov (#1561)
* fix coverage report (#1553)

* codecov
2022-05-24 17:22:08 +02:00
mmetc
f1cfcfe7cc
fix coverage report (#1553) 2022-05-23 09:50:35 +02:00
mmetc
a7c7ea5712
increase lint timeout for windows (#1543) 2022-05-23 09:45:32 +02:00
mmetc
afbdcd520b
update docker docs: filter on github.repository_owner == 'crowdsecurity' (#1511) 2022-05-17 12:49:25 +02:00
blotus
0449ec1868
Windows Support (#1159) 2022-05-17 12:14:59 +02:00
he2ss
2169dc674f
publish docker image to ghcr also (#1467) 2022-04-20 16:02:20 +02:00
mmetc
d6d9bdd2ec
db tests CI: skip jobs by default; fix pg dump; check client requirements (#1454) 2022-04-19 11:41:50 +02:00
mmetc
5f2797c83c
more func test coverage; capture exit code for bincover (#1425) 2022-04-13 15:44:23 +02:00
mmetc
0190614342
show crowdsec logs after the tests (#1439) 2022-04-13 15:03:37 +02:00
mmetc
bf4bc0c9fc
single workflow for all tests, with bats coverage (#1413) 2022-04-05 11:00:11 +02:00
mmetc
7e36432bf5
use golangci-lint 1.45.2 (#1420) 2022-04-04 21:16:18 +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
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
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
7baa5d623b
pgx driver tests (#1379) 2022-03-23 11:13:23 +01:00
mmetc
8df58df757
use secret for db passwords in tests (#1381) 2022-03-23 09:40:23 +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
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
b050d27e20
bats changes to allow bouncer testing (#1345) 2022-03-15 10:40:01 +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
59ad91a8ca
functional tests with bats-core (#1266) 2022-03-09 14:45:36 +01:00
he2ss
45c1075ae0
docker image: add multi arch platforms (#1270)
* docker image: add multi arch platforms
2022-02-28 12:04:31 +01:00