Commit graph

24 commits

Author SHA1 Message Date
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
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 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
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
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 131ed1b0a7
error reporting (#1501)
* unified error reporting, removed redundancy, tests
2022-05-19 10:48:08 +02:00
mmetc 2044a0677e
bats: ignore pre-installed hub objects like whitelist etc. (#1455) 2022-04-19 14:22:59 +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 c54c9f2951
skip broken tests (w/ postgres and test coverage) (#1410) 2022-04-01 15:03:17 +02:00
mmetc b202e387cf
fix "cscli" without arguments (#1406) 2022-03-31 16:50:38 +02: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
mmetc b6aca81ebd
allow "cscli completion..." without configuration file (#1340) 2022-03-10 14:57:14 +01:00
mmetc 0c35263c29
fix bats-test for freebsd (#1333) 2022-03-10 12:19:02 +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