-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
in_kubernetes_events: add tests and move connection stream up to context
Signed-off-by: ryanohnemus <[email protected]>
- Loading branch information
1 parent
540f537
commit 99bad45
Showing
10 changed files
with
564 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
tests/runtime/data/in_kubernetes_events/eventlist_v1_with_creationTimestamp.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"kind": "EventList", | ||
"apiVersion": "v1", | ||
"metadata": { | ||
"resourceVersion": "177157" | ||
}, | ||
"items": [ | ||
{ | ||
"metadata": { | ||
"name": "fluent-bit-78945dccd8-2g7qg.17a3c80ba0453aee", | ||
"namespace": "default", | ||
"uid": "6e3013d5-a79b-4dc4-b6c0-6b652302672e", | ||
"resourceVersion": "176761", | ||
"creationTimestamp": "2023-12-24T13:37:16Z", | ||
"managedFields": [ | ||
{ | ||
"manager": "kube-scheduler", | ||
"operation": "Update", | ||
"apiVersion": "events.k8s.io/v1", | ||
"time": "2023-12-24T13:37:16Z", | ||
"fieldsType": "FieldsV1", | ||
"fieldsV1": { | ||
"f:action": {}, | ||
"f:eventTime": {}, | ||
"f:note": {}, | ||
"f:reason": {}, | ||
"f:regarding": {}, | ||
"f:reportingController": {}, | ||
"f:reportingInstance": {}, | ||
"f:type": {} | ||
} | ||
} | ||
] | ||
}, | ||
"involvedObject": { | ||
"kind": "Pod", | ||
"namespace": "default", | ||
"name": "fluent-bit-78945dccd8-2g7qg", | ||
"uid": "ed7de8ff-61fb-40bb-9ecb-55a801a4cd89", | ||
"apiVersion": "v1", | ||
"resourceVersion": "176749" | ||
}, | ||
"reason": "FailedScheduling", | ||
"message": "0/1 nodes are available: 1 Insufficient cpu. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod..", | ||
"source": {}, | ||
"firstTimestamp": null, | ||
"lastTimestamp": null, | ||
"type": "Warning", | ||
"eventTime": "2023-12-24T13:37:16.335172Z", | ||
"action": "Scheduling", | ||
"reportingComponent": "default-scheduler", | ||
"reportingInstance": "default-scheduler-minikube" | ||
} | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
tests/runtime/data/in_kubernetes_events/eventlist_v1_with_creationTimestamp.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[1703425036.000000,{"metadata":{"name":"fluent-bit-78945dccd8-2g7qg.17a3c80ba0453aee","namespace":"default","uid":"6e3013d5-a79b-4dc4-b6c0-6b652302672e","resourceVersion":"176761","creationTimestamp":"2023-12-24T13:37:16Z","managedFields":[{"manager":"kube-scheduler","operation":"Update","apiVersion":"events.k8s.io/v1","time":"2023-12-24T13:37:16Z","fieldsType":"FieldsV1","fieldsV1":{"f:action":{},"f:eventTime":{},"f:note":{},"f:reason":{},"f:regarding":{},"f:reportingController":{},"f:reportingInstance":{},"f:type":{}}}]},"involvedObject":{"kind":"Pod","namespace":"default","name":"fluent-bit-78945dccd8-2g7qg","uid":"ed7de8ff-61fb-40bb-9ecb-55a801a4cd89","apiVersion":"v1","resourceVersion":"176749"},"reason":"FailedScheduling","message":"0/1 nodes are available: 1 Insufficient cpu. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod..","source":{},"firstTimestamp":null,"lastTimestamp":null,"type":"Warning","eventTime":"2023-12-24T13:37:16.335172Z","action":"Scheduling","reportingComponent":"default-scheduler","reportingInstance":"default-scheduler-minikube"}] |
55 changes: 55 additions & 0 deletions
55
tests/runtime/data/in_kubernetes_events/eventlist_v1_with_lastTimestamp.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"kind": "EventList", | ||
"apiVersion": "v1", | ||
"metadata": { | ||
"resourceVersion": "177157" | ||
}, | ||
"items": [ | ||
{ | ||
"metadata": { | ||
"name": ".17a3ba8b4aa36c81", | ||
"namespace": "default", | ||
"uid": "ec5546b7-f1b9-4e61-a90c-a1f3b611edbc", | ||
"resourceVersion": "174688", | ||
"creationTimestamp": "2023-12-24T09:30:07Z", | ||
"managedFields": [ | ||
{ | ||
"manager": "storage-provisioner", | ||
"operation": "Update", | ||
"apiVersion": "v1", | ||
"time": "2023-12-24T09:30:07Z", | ||
"fieldsType": "FieldsV1", | ||
"fieldsV1": { | ||
"f:count": {}, | ||
"f:firstTimestamp": {}, | ||
"f:involvedObject": {}, | ||
"f:lastTimestamp": {}, | ||
"f:message": {}, | ||
"f:reason": {}, | ||
"f:source": { | ||
"f:component": {} | ||
}, | ||
"f:type": {} | ||
} | ||
} | ||
] | ||
}, | ||
"involvedObject": { | ||
"kind": "Endpoints", | ||
"apiVersion": "v1" | ||
}, | ||
"reason": "LeaderElection", | ||
"message": "minikube_31f5cdfb-29b0-4f84-9f9c-585088e9235f stopped leading", | ||
"source": { | ||
"component": "k8s.io/minikube-hostpath_minikube_31f5cdfb-29b0-4f84-9f9c-585088e9235f" | ||
}, | ||
"firstTimestamp": "2023-12-24T09:29:51Z", | ||
"lastTimestamp": "2023-12-24T09:29:51Z", | ||
"count": 1, | ||
"type": "Normal", | ||
"eventTime": null, | ||
"reportingComponent": "", | ||
"reportingInstance": "" | ||
} | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
tests/runtime/data/in_kubernetes_events/eventlist_v1_with_lastTimestamp.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[1703410191.000000,{"metadata":{"name":".17a3ba8b4aa36c81","namespace":"default","uid":"ec5546b7-f1b9-4e61-a90c-a1f3b611edbc","resourceVersion":"174688","creationTimestamp":"2023-12-24T09:30:07Z","managedFields":[{"manager":"storage-provisioner","operation":"Update","apiVersion":"v1","time":"2023-12-24T09:30:07Z","fieldsType":"FieldsV1","fieldsV1":{"f:count":{},"f:firstTimestamp":{},"f:involvedObject":{},"f:lastTimestamp":{},"f:message":{},"f:reason":{},"f:source":{"f:component":{}},"f:type":{}}}]},"involvedObject":{"kind":"Endpoints","apiVersion":"v1"},"reason":"LeaderElection","message":"minikube_31f5cdfb-29b0-4f84-9f9c-585088e9235f stopped leading","source":{"component":"k8s.io/minikube-hostpath_minikube_31f5cdfb-29b0-4f84-9f9c-585088e9235f"},"firstTimestamp":"2023-12-24T09:29:51Z","lastTimestamp":"2023-12-24T09:29:51Z","count":1,"type":"Normal","eventTime":null,"reportingComponent":"","reportingInstance":""}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fakeTokenFile |
Oops, something went wrong.