crowdsec/pkg/apiserver/tests/alert_sample.json
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

77 lines
No EOL
2 KiB
JSON

[
{
"id": 42,
"machine_id": "test",
"capacity": 1,
"created_at": "2020-10-09T10:00:10Z",
"decisions": [
{
"id": 1,
"duration": "1h",
"origin": "test",
"scenario": "crowdsecurity/test",
"scope": "Ip",
"value": "127.0.0.1",
"type": "ban"
},
{
"id": 2,
"duration": "2h",
"origin": "test",
"scenario": "crowdsecurity/test",
"scope": "Ip",
"value": "127.0.0.1",
"type": "ban"
},
{
"id": 3,
"duration": "3h",
"origin": "test",
"scenario": "crowdsecurity/test",
"scope": "Ip",
"value": "127.0.0.1",
"type": "ban"
}
],
"Events": [
{
"meta": [
{
"key": "test",
"value": "test"
}
],
"timestamp": "2020-10-09T10:00:01Z"
}
],
"events_count": 1,
"labels": [
"test"
],
"leakspeed": "0.5s",
"message": "test",
"meta": [
{
"key": "test",
"value": "test"
}
],
"scenario": "crowdsecurity/test",
"scenario_hash": "hashtest",
"scenario_version": "v1",
"simulated": false,
"source": {
"as_name": "test",
"as_number": "0123456",
"cn": "france",
"ip": "127.0.0.1",
"latitude": 46.227638,
"logitude": 2.213749,
"range": "127.0.0.1/32",
"scope": "ip",
"value": "127.0.0.1"
},
"start_at": "2020-10-09T10:00:01Z",
"stop_at": "2020-10-09T10:00:05Z"
}
]