chore: status_test.go check pod labels & terminating status
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
This commit is contained in:
parent
a0344d64b3
commit
8216d4a727
1 changed files with 42 additions and 0 deletions
|
@ -101,6 +101,31 @@ func buildSimpleClientSet() *testclient.Clientset {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
|
Name: "foo_terminating",
|
||||||
|
Namespace: metav1.NamespaceDefault,
|
||||||
|
Labels: map[string]string{
|
||||||
|
"label_sig": "foo_pod",
|
||||||
|
"app.kubernetes.io/version": "x.x.x",
|
||||||
|
"pod-template-hash": "hash-value",
|
||||||
|
"controller-revision-hash": "deadbeef",
|
||||||
|
},
|
||||||
|
DeletionTimestamp: &metav1.Time{},
|
||||||
|
},
|
||||||
|
Spec: apiv1.PodSpec{
|
||||||
|
NodeName: "foo_node_3",
|
||||||
|
},
|
||||||
|
Status: apiv1.PodStatus{
|
||||||
|
Phase: apiv1.PodRunning,
|
||||||
|
Conditions: []apiv1.PodCondition{
|
||||||
|
{
|
||||||
|
Type: apiv1.PodReady,
|
||||||
|
Status: apiv1.ConditionTrue,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Name: "foo3",
|
Name: "foo3",
|
||||||
|
@ -168,6 +193,23 @@ func buildSimpleClientSet() *testclient.Clientset {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
|
Name: "foo_node_3",
|
||||||
|
},
|
||||||
|
Status: apiv1.NodeStatus{
|
||||||
|
Addresses: []apiv1.NodeAddress{
|
||||||
|
{
|
||||||
|
Type: apiv1.NodeInternalIP,
|
||||||
|
Address: "12.0.0.1",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Type: apiv1.NodeExternalIP,
|
||||||
|
Address: "12.0.0.2",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}},
|
}},
|
||||||
&apiv1.EndpointsList{Items: []apiv1.Endpoints{
|
&apiv1.EndpointsList{Items: []apiv1.Endpoints{
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue