Skip to content

Commit

Permalink
chore: add fixtures with status in both aged and current
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Dec 20, 2023
1 parent 6e333cc commit f0bbdec
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
1 change: 1 addition & 0 deletions tests/fixtures/dummy/check_statuses.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func AllDummyCheckStatuses() []models.CheckStatus {
},
)

statuses = append(statuses, generateStatus(DeletedCheck1h, CurrentTime.Add(-15*time.Minute), 1, 1)[0])
statuses = append(statuses, generateStatus(DeletedCheck1h, CurrentTime.Add(-2*time.Hour), 10, 2)...)

return statuses
Expand Down
46 changes: 23 additions & 23 deletions tests/fixtures/expectations/check_status_summary_deleted.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"canary_id": "6dc9d6dd-0b55-4801-837c-352d3abf9b70",
"canary_name": "dummy-cart-api-canary",
"canary_namespace": "cart",
"created_at": "2023-12-20T20:27:12.717001+02:00",
"created_at": "2023-12-20T20:39:48.117+02:00",
"id": "eed7bd6e-529b-4693-aca9-43977bcc5ff1",
"labels": {},
"latency": {
Expand All @@ -13,7 +13,7 @@
"namespace": "",
"status": "healthy",
"type": "http",
"updated_at": "2023-12-20T20:27:12.717001+02:00",
"updated_at": "2023-12-20T20:39:48.117+02:00",
"uptime": {
"failed": 0,
"passed": 0
Expand All @@ -23,12 +23,12 @@
"canary_id": "6dc9d6dd-0b55-4801-837c-352d3abf9b70",
"canary_name": "dummy-cart-api-canary",
"canary_namespace": "cart",
"created_at": "2023-12-20T18:27:12.687818+02:00",
"deleted_at": "2023-12-20T18:47:12.687818+02:00",
"created_at": "2023-12-20T18:39:48.093684+02:00",
"deleted_at": "2023-12-20T18:59:48.093684+02:00",
"id": "eed7bd6e-529b-4693-aca9-55177bcc5ff2",
"labels": {},
"latency": {
"avg": 110,
"avg": 101.81818181818181,
"p50": 100,
"p95": 200,
"p99": 200,
Expand All @@ -38,20 +38,20 @@
"namespace": "",
"status": "healthy",
"type": "http",
"updated_at": "2023-12-20T20:27:12.715639+02:00",
"updated_at": "2023-12-20T20:39:48.115943+02:00",
"uptime": {
"failed": 5,
"last_fail": "2023-12-20T18:35:12+02:00",
"last_pass": "2023-12-20T18:36:12+02:00",
"failed": 6,
"last_fail": "2023-12-20T20:24:48+02:00",
"last_pass": "2023-12-20T18:48:48+02:00",
"passed": 5
}
},
{
"canary_id": "6dc9d6dd-0b55-4801-837c-352d3abf9b70",
"canary_name": "dummy-cart-api-canary",
"canary_namespace": "cart",
"created_at": "2023-12-20T20:17:12.687818+02:00",
"deleted_at": "2023-12-20T20:22:12.687818+02:00",
"created_at": "2023-12-20T20:29:48.093684+02:00",
"deleted_at": "2023-12-20T20:34:48.093684+02:00",
"id": "eed7bd6e-529b-4693-aca9-55177bcc5ff1",
"labels": {},
"latency": {
Expand All @@ -65,18 +65,18 @@
"namespace": "",
"status": "healthy",
"type": "http",
"updated_at": "2023-12-20T20:27:12.714515+02:00",
"updated_at": "2023-12-20T20:39:48.115059+02:00",
"uptime": {
"failed": 1,
"last_fail": "2023-12-20T20:27:12+02:00",
"last_fail": "2023-12-20T20:39:48+02:00",
"passed": 0
}
},
{
"canary_id": "0186b7a5-a2a4-86fd-c326-3a2104a2777f",
"canary_name": "dummy-logistics-api-canary",
"canary_namespace": "logistics",
"created_at": "2023-12-20T20:27:12.715952+02:00",
"created_at": "2023-12-20T20:39:48.116145+02:00",
"id": "0186b7a4-0593-73e9-7e3d-5b3446336c1d",
"labels": {},
"latency": {
Expand All @@ -90,19 +90,19 @@
"namespace": "",
"status": "healthy",
"type": "http",
"updated_at": "2023-12-20T20:27:12.715952+02:00",
"updated_at": "2023-12-20T20:39:48.116145+02:00",
"uptime": {
"failed": 14,
"last_fail": "2023-12-20T21:32:12+02:00",
"last_pass": "2023-12-20T21:36:12+02:00",
"last_fail": "2023-12-20T21:44:48+02:00",
"last_pass": "2023-12-20T21:48:48+02:00",
"passed": 56
}
},
{
"canary_id": "0186b7a5-a2a4-86fd-c326-3a2104a2777f",
"canary_name": "dummy-logistics-api-canary",
"canary_namespace": "logistics",
"created_at": "2023-12-20T20:27:12.71626+02:00",
"created_at": "2023-12-20T20:39:48.116389+02:00",
"id": "0186b7a4-625a-6a38-a9a7-e5e6b44ffec3",
"labels": {},
"latency": {
Expand All @@ -116,18 +116,18 @@
"namespace": "",
"status": "healthy",
"type": "http",
"updated_at": "2023-12-20T20:27:12.71626+02:00",
"updated_at": "2023-12-20T20:39:48.116389+02:00",
"uptime": {
"failed": 0,
"last_pass": "2023-12-20T20:22:12+02:00",
"last_pass": "2023-12-20T20:34:48+02:00",
"passed": 1
}
},
{
"canary_id": "0186b7a5-f246-3628-0d68-30bffc13244d",
"canary_name": "dummy-logistics-db-canary",
"canary_namespace": "logistics",
"created_at": "2023-12-20T20:27:12.71658+02:00",
"created_at": "2023-12-20T20:39:48.116595+02:00",
"id": "0186b7a4-9338-7142-1b10-25dc49030218",
"labels": {},
"latency": {
Expand All @@ -141,10 +141,10 @@
"namespace": "",
"status": "unhealthy",
"type": "postgres",
"updated_at": "2023-12-20T20:27:12.71658+02:00",
"updated_at": "2023-12-20T20:39:48.116595+02:00",
"uptime": {
"failed": 1,
"last_fail": "2023-12-20T19:17:12+02:00",
"last_fail": "2023-12-20T19:29:48+02:00",
"passed": 0
}
}
Expand Down

0 comments on commit f0bbdec

Please sign in to comment.