Drop null creationTimestamp from test fixtures
Kubernetes-commit: 6bb6c9934294d8265197c9dfc4c9dd3adaca147a
This commit is contained in:
parent
0cdb311ed6
commit
722397942b
|
@ -2605,7 +2605,6 @@ metadata:
|
||||||
applyset.kubernetes.io/additional-namespaces: ""
|
applyset.kubernetes.io/additional-namespaces: ""
|
||||||
applyset.kubernetes.io/contains-group-kinds: ReplicationController
|
applyset.kubernetes.io/contains-group-kinds: ReplicationController
|
||||||
applyset.kubernetes.io/tooling: kubectl/v0.0.0-master+$Format:%H$
|
applyset.kubernetes.io/tooling: kubectl/v0.0.0-master+$Format:%H$
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
labels:
|
||||||
applyset.kubernetes.io/id: applyset-0eFHV8ySqp7XoShsGvyWFQD3s96yqwHmzc4e0HR1dsY-v1
|
applyset.kubernetes.io/id: applyset-0eFHV8ySqp7XoShsGvyWFQD3s96yqwHmzc4e0HR1dsY-v1
|
||||||
name: my-set
|
name: my-set
|
||||||
|
@ -2639,7 +2638,6 @@ metadata:
|
||||||
applyset.kubernetes.io/additional-namespaces: ""
|
applyset.kubernetes.io/additional-namespaces: ""
|
||||||
applyset.kubernetes.io/contains-group-kinds: ReplicationController,Service
|
applyset.kubernetes.io/contains-group-kinds: ReplicationController,Service
|
||||||
applyset.kubernetes.io/tooling: kubectl/v0.0.0-master+$Format:%H$
|
applyset.kubernetes.io/tooling: kubectl/v0.0.0-master+$Format:%H$
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
labels:
|
||||||
applyset.kubernetes.io/id: applyset-0eFHV8ySqp7XoShsGvyWFQD3s96yqwHmzc4e0HR1dsY-v1
|
applyset.kubernetes.io/id: applyset-0eFHV8ySqp7XoShsGvyWFQD3s96yqwHmzc4e0HR1dsY-v1
|
||||||
name: my-set
|
name: my-set
|
||||||
|
@ -2674,7 +2672,6 @@ metadata:
|
||||||
applyset.kubernetes.io/additional-namespaces: ""
|
applyset.kubernetes.io/additional-namespaces: ""
|
||||||
applyset.kubernetes.io/contains-group-kinds: ReplicationController,Service
|
applyset.kubernetes.io/contains-group-kinds: ReplicationController,Service
|
||||||
applyset.kubernetes.io/tooling: kubectl/v0.0.0-master+$Format:%H$
|
applyset.kubernetes.io/tooling: kubectl/v0.0.0-master+$Format:%H$
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
labels:
|
||||||
applyset.kubernetes.io/id: applyset-0eFHV8ySqp7XoShsGvyWFQD3s96yqwHmzc4e0HR1dsY-v1
|
applyset.kubernetes.io/id: applyset-0eFHV8ySqp7XoShsGvyWFQD3s96yqwHmzc4e0HR1dsY-v1
|
||||||
name: my-set
|
name: my-set
|
||||||
|
@ -2709,7 +2706,6 @@ metadata:
|
||||||
applyset.kubernetes.io/additional-namespaces: ""
|
applyset.kubernetes.io/additional-namespaces: ""
|
||||||
applyset.kubernetes.io/contains-group-kinds: Service
|
applyset.kubernetes.io/contains-group-kinds: Service
|
||||||
applyset.kubernetes.io/tooling: kubectl/v0.0.0-master+$Format:%H$
|
applyset.kubernetes.io/tooling: kubectl/v0.0.0-master+$Format:%H$
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
labels:
|
||||||
applyset.kubernetes.io/id: applyset-0eFHV8ySqp7XoShsGvyWFQD3s96yqwHmzc4e0HR1dsY-v1
|
applyset.kubernetes.io/id: applyset-0eFHV8ySqp7XoShsGvyWFQD3s96yqwHmzc4e0HR1dsY-v1
|
||||||
name: my-set
|
name: my-set
|
||||||
|
@ -2872,7 +2868,6 @@ metadata:
|
||||||
applyset.kubernetes.io/additional-namespaces: test
|
applyset.kubernetes.io/additional-namespaces: test
|
||||||
applyset.kubernetes.io/contains-group-kinds: ReplicationController
|
applyset.kubernetes.io/contains-group-kinds: ReplicationController
|
||||||
applyset.kubernetes.io/tooling: kubectl/v0.0.0-master+$Format:%H$
|
applyset.kubernetes.io/tooling: kubectl/v0.0.0-master+$Format:%H$
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
labels:
|
||||||
applyset.kubernetes.io/id: applyset-rhp1a-HVAVT_dFgyEygyA1BEB82HPp2o10UiFTpqtAs-v1
|
applyset.kubernetes.io/id: applyset-rhp1a-HVAVT_dFgyEygyA1BEB82HPp2o10UiFTpqtAs-v1
|
||||||
name: my-set
|
name: my-set
|
||||||
|
@ -3090,7 +3085,6 @@ metadata:
|
||||||
applyset.kubernetes.io/additional-namespaces: ""
|
applyset.kubernetes.io/additional-namespaces: ""
|
||||||
applyset.kubernetes.io/contains-group-resources: replicationcontrollers
|
applyset.kubernetes.io/contains-group-resources: replicationcontrollers
|
||||||
applyset.kubernetes.io/tooling: kubectl/v0.0.0-master+$Format:%H$
|
applyset.kubernetes.io/tooling: kubectl/v0.0.0-master+$Format:%H$
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
labels:
|
||||||
applyset.kubernetes.io/id: applyset-0eFHV8ySqp7XoShsGvyWFQD3s96yqwHmzc4e0HR1dsY-v1
|
applyset.kubernetes.io/id: applyset-0eFHV8ySqp7XoShsGvyWFQD3s96yqwHmzc4e0HR1dsY-v1
|
||||||
name: my-set
|
name: my-set
|
||||||
|
|
|
@ -75,9 +75,7 @@ func TestWhoAmIRun(t *testing.T) {
|
||||||
`{
|
`{
|
||||||
"kind": "SelfSubjectReview",
|
"kind": "SelfSubjectReview",
|
||||||
"apiVersion": "authentication.k8s.io/v1",
|
"apiVersion": "authentication.k8s.io/v1",
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"creationTimestamp": null
|
|
||||||
},
|
|
||||||
"status": {
|
"status": {
|
||||||
"userInfo": {
|
"userInfo": {
|
||||||
"username": "jane.doe",
|
"username": "jane.doe",
|
||||||
|
@ -131,9 +129,7 @@ func TestWhoAmIRun(t *testing.T) {
|
||||||
`{
|
`{
|
||||||
"kind": "SelfSubjectReview",
|
"kind": "SelfSubjectReview",
|
||||||
"apiVersion": "authentication.k8s.io/v1beta1",
|
"apiVersion": "authentication.k8s.io/v1beta1",
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"creationTimestamp": null
|
|
||||||
},
|
|
||||||
"status": {
|
"status": {
|
||||||
"userInfo": {
|
"userInfo": {
|
||||||
"username": "jane.doe",
|
"username": "jane.doe",
|
||||||
|
@ -186,9 +182,7 @@ func TestWhoAmIRun(t *testing.T) {
|
||||||
`{
|
`{
|
||||||
"kind": "SelfSubjectReview",
|
"kind": "SelfSubjectReview",
|
||||||
"apiVersion": "authentication.k8s.io/v1",
|
"apiVersion": "authentication.k8s.io/v1",
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"creationTimestamp": null
|
|
||||||
},
|
|
||||||
"status": {
|
"status": {
|
||||||
"userInfo": {
|
"userInfo": {
|
||||||
"username": "jane.doe",
|
"username": "jane.doe",
|
||||||
|
|
|
@ -99,8 +99,7 @@ func TestCreateToken(t *testing.T) {
|
||||||
serverResponseToken: "abc",
|
serverResponseToken: "abc",
|
||||||
expectStdout: `apiVersion: authentication.k8s.io/v1
|
expectStdout: `apiVersion: authentication.k8s.io/v1
|
||||||
kind: TokenRequest
|
kind: TokenRequest
|
||||||
metadata:
|
metadata: {}
|
||||||
creationTimestamp: null
|
|
||||||
spec:
|
spec:
|
||||||
audiences: null
|
audiences: null
|
||||||
boundObjectRef: null
|
boundObjectRef: null
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"kind": "Service",
|
"kind": "Service",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"annotations": {
|
"annotations": {
|
||||||
"kubectl.kubernetes.io/last-applied-configuration": "{\"kind\":\"Service\",\"apiVersion\":\"v1\",\"metadata\":{\"name\":\"svc1\",\"creationTimestamp\":null,\"labels\":{\"app\":\"svc1\"}},\"spec\":{\"ports\":[{\"name\":\"80\",\"protocol\":\"TCP\",\"port\":80,\"targetPort\":80}],\"selector\":{\"app\":\"svc1\"},\"type\":\"ClusterIP\"},\"status\":{\"loadBalancer\":{}}}\n"
|
"kubectl.kubernetes.io/last-applied-configuration": "{\"kind\":\"Service\",\"apiVersion\":\"v1\",\"metadata\":{\"name\":\"svc1\",\"labels\":{\"app\":\"svc1\"}},\"spec\":{\"ports\":[{\"name\":\"80\",\"protocol\":\"TCP\",\"port\":80,\"targetPort\":80}],\"selector\":{\"app\":\"svc1\"},\"type\":\"ClusterIP\"},\"status\":{\"loadBalancer\":{}}}\n"
|
||||||
},
|
},
|
||||||
"creationTimestamp": "2017-02-27T19:40:53Z",
|
"creationTimestamp": "2017-02-27T19:40:53Z",
|
||||||
"labels": {
|
"labels": {
|
||||||
|
|
|
@ -7,7 +7,7 @@ kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
kubectl.kubernetes.io/last-applied-configuration: |
|
kubectl.kubernetes.io/last-applied-configuration: |
|
||||||
{"kind":"Service","apiVersion":"v1","metadata":{"name":"svc1","creationTimestamp":null,"labels":{"app":"svc1"}},"spec":{"ports":[{"name":"80","protocol":"TCP","port":80,"targetPort":80}],"selector":{"app":"svc1"},"type":"ClusterIP"},"status":{"loadBalancer":{}}}
|
{"kind":"Service","apiVersion":"v1","metadata":{"name":"svc1","labels":{"app":"svc1"}},"spec":{"ports":[{"name":"80","protocol":"TCP","port":80,"targetPort":80}],"selector":{"app":"svc1"},"type":"ClusterIP"},"status":{"loadBalancer":{}}}
|
||||||
creationTimestamp: "2017-02-27T19:40:53Z"
|
creationTimestamp: "2017-02-27T19:40:53Z"
|
||||||
labels:
|
labels:
|
||||||
app: svc1
|
app: svc1
|
||||||
|
|
|
@ -7,7 +7,7 @@ kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
kubectl.kubernetes.io/last-applied-configuration: |
|
kubectl.kubernetes.io/last-applied-configuration: |
|
||||||
{"kind":"Service","apiVersion":"v1","metadata":{"name":"svc1","creationTimestamp":null,"labels":{"app":"svc1"}},"spec":{"ports":[{"name":"80","protocol":"TCP","port":80,"targetPort":80}],"selector":{"app":"svc1"},"type":"ClusterIP"},"status":{"loadBalancer":{}}}
|
{"kind":"Service","apiVersion":"v1","metadata":{"name":"svc1","labels":{"app":"svc1"}},"spec":{"ports":[{"name":"80","protocol":"TCP","port":80,"targetPort":80}],"selector":{"app":"svc1"},"type":"ClusterIP"},"status":{"loadBalancer":{}}}
|
||||||
creationTimestamp: "2017-02-27T19:40:53Z"
|
creationTimestamp: "2017-02-27T19:40:53Z"
|
||||||
labels:
|
labels:
|
||||||
app: svc1
|
app: svc1
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
},
|
},
|
||||||
"template": {
|
"template": {
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"creationTimestamp": null,
|
|
||||||
"labels": {
|
"labels": {
|
||||||
"app": "nginx"
|
"app": "nginx"
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ spec:
|
||||||
type: RollingUpdate
|
type: RollingUpdate
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
labels:
|
||||||
app: nginx
|
app: nginx
|
||||||
spec:
|
spec:
|
||||||
|
|
|
@ -29,7 +29,6 @@ spec:
|
||||||
type: RollingUpdate
|
type: RollingUpdate
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
labels:
|
||||||
app: nginx
|
app: nginx
|
||||||
spec:
|
spec:
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
},
|
},
|
||||||
"template": {
|
"template": {
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"creationTimestamp": null,
|
|
||||||
"labels": {
|
"labels": {
|
||||||
"app": "nginx"
|
"app": "nginx"
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"kind": "Service",
|
"kind": "Service",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"annotations": {
|
"annotations": {
|
||||||
"kubectl.kubernetes.io/last-applied-configuration": "{\"kind\":\"Service\",\"apiVersion\":\"v1\",\"metadata\":{\"name\":\"svc1\",\"creationTimestamp\":null,\"labels\":{\"app\":\"svc1\"}},\"spec\":{\"ports\":[{\"name\":\"80\",\"protocol\":\"TCP\",\"port\":80,\"targetPort\":80}],\"selector\":{\"app\":\"svc1\"},\"type\":\"ClusterIP\"},\"status\":{\"loadBalancer\":{}}}\n"
|
"kubectl.kubernetes.io/last-applied-configuration": "{\"kind\":\"Service\",\"apiVersion\":\"v1\",\"metadata\":{\"name\":\"svc1\",\"labels\":{\"app\":\"svc1\"}},\"spec\":{\"ports\":[{\"name\":\"80\",\"protocol\":\"TCP\",\"port\":80,\"targetPort\":80}],\"selector\":{\"app\":\"svc1\"},\"type\":\"ClusterIP\"},\"status\":{\"loadBalancer\":{}}}\n"
|
||||||
},
|
},
|
||||||
"creationTimestamp": "2017-02-27T19:40:53Z",
|
"creationTimestamp": "2017-02-27T19:40:53Z",
|
||||||
"labels": {
|
"labels": {
|
||||||
|
|
|
@ -7,7 +7,7 @@ kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
kubectl.kubernetes.io/last-applied-configuration: |
|
kubectl.kubernetes.io/last-applied-configuration: |
|
||||||
{"kind":"Service","apiVersion":"v1","metadata":{"name":"svc1","creationTimestamp":null,"labels":{"app":"svc1"}},"spec":{"ports":[{"name":"80","protocol":"TCP","port":80,"targetPort":80}],"selector":{"app":"svc1"},"type":"ClusterIP"},"status":{"loadBalancer":{}}}
|
{"kind":"Service","apiVersion":"v1","metadata":{"name":"svc1","labels":{"app":"svc1"}},"spec":{"ports":[{"name":"80","protocol":"TCP","port":80,"targetPort":80}],"selector":{"app":"svc1"},"type":"ClusterIP"},"status":{"loadBalancer":{}}}
|
||||||
creationTimestamp: "2017-02-27T19:40:53Z"
|
creationTimestamp: "2017-02-27T19:40:53Z"
|
||||||
labels:
|
labels:
|
||||||
app: svc1
|
app: svc1
|
||||||
|
|
|
@ -7,7 +7,7 @@ kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
kubectl.kubernetes.io/last-applied-configuration: |
|
kubectl.kubernetes.io/last-applied-configuration: |
|
||||||
{"kind":"Service","apiVersion":"v1","metadata":{"name":"svc1","creationTimestamp":null,"labels":{"app":"svc1"}},"spec":{"ports":[{"name":"80","protocol":"TCP","port":80,"targetPort":80}],"selector":{"app":"svc1"},"type":"ClusterIP"},"status":{"loadBalancer":{}}}
|
{"kind":"Service","apiVersion":"v1","metadata":{"name":"svc1","labels":{"app":"svc1"}},"spec":{"ports":[{"name":"80","protocol":"TCP","port":80,"targetPort":80}],"selector":{"app":"svc1"},"type":"ClusterIP"},"status":{"loadBalancer":{}}}
|
||||||
creationTimestamp: "2017-02-27T19:40:53Z"
|
creationTimestamp: "2017-02-27T19:40:53Z"
|
||||||
labels:
|
labels:
|
||||||
app: svc1
|
app: svc1
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"kind": "Service",
|
"kind": "Service",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"annotations": {
|
"annotations": {
|
||||||
"kubectl.kubernetes.io/last-applied-configuration": "{\"kind\":\"Service\",\"apiVersion\":\"v1\",\"metadata\":{\"name\":\"svc1\",\"creationTimestamp\":null,\"labels\":{\"app\":\"svc1\"}},\"spec\":{\"ports\":[{\"name\":\"80\",\"protocol\":\"TCP\",\"port\":80,\"targetPort\":80}],\"selector\":{\"app\":\"svc1\"},\"type\":\"ClusterIP\"},\"status\":{\"loadBalancer\":{}}}\n"
|
"kubectl.kubernetes.io/last-applied-configuration": "{\"kind\":\"Service\",\"apiVersion\":\"v1\",\"metadata\":{\"name\":\"svc1\",\"labels\":{\"app\":\"svc1\"}},\"spec\":{\"ports\":[{\"name\":\"80\",\"protocol\":\"TCP\",\"port\":80,\"targetPort\":80}],\"selector\":{\"app\":\"svc1\"},\"type\":\"ClusterIP\"},\"status\":{\"loadBalancer\":{}}}\n"
|
||||||
},
|
},
|
||||||
"creationTimestamp": "2017-02-27T19:40:53Z",
|
"creationTimestamp": "2017-02-27T19:40:53Z",
|
||||||
"labels": {
|
"labels": {
|
||||||
|
|
|
@ -7,7 +7,7 @@ kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
kubectl.kubernetes.io/last-applied-configuration: |
|
kubectl.kubernetes.io/last-applied-configuration: |
|
||||||
{"kind":"Service","apiVersion":"v1","metadata":{"name":"svc1","creationTimestamp":null,"labels":{"app":"svc1"}},"spec":{"ports":[{"name":"80","protocol":"TCP","port":80,"targetPort":80}],"selector":{"app":"svc1"},"type":"ClusterIP"},"status":{"loadBalancer":{}}}
|
{"kind":"Service","apiVersion":"v1","metadata":{"name":"svc1","labels":{"app":"svc1"}},"spec":{"ports":[{"name":"80","protocol":"TCP","port":80,"targetPort":80}],"selector":{"app":"svc1"},"type":"ClusterIP"},"status":{"loadBalancer":{}}}
|
||||||
creationTimestamp: "2017-02-27T19:40:53Z"
|
creationTimestamp: "2017-02-27T19:40:53Z"
|
||||||
labels:
|
labels:
|
||||||
app: svc1
|
app: svc1
|
||||||
|
|
|
@ -7,7 +7,7 @@ kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
kubectl.kubernetes.io/last-applied-configuration: |
|
kubectl.kubernetes.io/last-applied-configuration: |
|
||||||
{"kind":"Service","apiVersion":"v1","metadata":{"name":"svc1","creationTimestamp":null,"labels":{"app":"svc1"}},"spec":{"ports":[{"name":"80","protocol":"TCP","port":80,"targetPort":80}],"selector":{"app":"svc1"},"type":"ClusterIP"},"status":{"loadBalancer":{}}}
|
{"kind":"Service","apiVersion":"v1","metadata":{"name":"svc1","labels":{"app":"svc1"}},"spec":{"ports":[{"name":"80","protocol":"TCP","port":80,"targetPort":80}],"selector":{"app":"svc1"},"type":"ClusterIP"},"status":{"loadBalancer":{}}}
|
||||||
creationTimestamp: "2017-02-27T19:40:53Z"
|
creationTimestamp: "2017-02-27T19:40:53Z"
|
||||||
labels:
|
labels:
|
||||||
app: svc1
|
app: svc1
|
||||||
|
|
|
@ -694,7 +694,6 @@ func TestExposeOverride(t *testing.T) {
|
||||||
expected: `apiVersion: v1
|
expected: `apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
labels:
|
||||||
svc: test
|
svc: test
|
||||||
name: foo
|
name: foo
|
||||||
|
@ -717,7 +716,6 @@ status:
|
||||||
expected: `apiVersion: v1
|
expected: `apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
labels:
|
||||||
svc: test
|
svc: test
|
||||||
name: foo
|
name: foo
|
||||||
|
@ -745,7 +743,6 @@ status:
|
||||||
expected: `apiVersion: v1
|
expected: `apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
labels:
|
||||||
svc: test
|
svc: test
|
||||||
name: foo
|
name: foo
|
||||||
|
@ -773,7 +770,6 @@ status:
|
||||||
expected: `apiVersion: v1
|
expected: `apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
labels:
|
||||||
svc: test
|
svc: test
|
||||||
name: foo
|
name: foo
|
||||||
|
|
|
@ -1438,7 +1438,6 @@ func TestGetMultipleTypeObjectsAsList(t *testing.T) {
|
||||||
"apiVersion": "v1",
|
"apiVersion": "v1",
|
||||||
"kind": "Pod",
|
"kind": "Pod",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"creationTimestamp": null,
|
|
||||||
"name": "foo",
|
"name": "foo",
|
||||||
"namespace": "test",
|
"namespace": "test",
|
||||||
"resourceVersion": "10"
|
"resourceVersion": "10"
|
||||||
|
@ -1457,7 +1456,6 @@ func TestGetMultipleTypeObjectsAsList(t *testing.T) {
|
||||||
"apiVersion": "v1",
|
"apiVersion": "v1",
|
||||||
"kind": "Pod",
|
"kind": "Pod",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"creationTimestamp": null,
|
|
||||||
"name": "bar",
|
"name": "bar",
|
||||||
"namespace": "test",
|
"namespace": "test",
|
||||||
"resourceVersion": "11"
|
"resourceVersion": "11"
|
||||||
|
@ -1476,7 +1474,6 @@ func TestGetMultipleTypeObjectsAsList(t *testing.T) {
|
||||||
"apiVersion": "v1",
|
"apiVersion": "v1",
|
||||||
"kind": "Service",
|
"kind": "Service",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"creationTimestamp": null,
|
|
||||||
"name": "baz",
|
"name": "baz",
|
||||||
"namespace": "test",
|
"namespace": "test",
|
||||||
"resourceVersion": "12"
|
"resourceVersion": "12"
|
||||||
|
@ -2367,10 +2364,10 @@ DELETED test pod/foo 0/0 0 <unknown> <none>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
format: "json",
|
format: "json",
|
||||||
expected: `{"type":"ADDED","object":{"apiVersion":"v1","kind":"Pod","metadata":{"creationTimestamp":null,"name":"bar","namespace":"test","resourceVersion":"9"},"spec":{"containers":null,"dnsPolicy":"ClusterFirst","enableServiceLinks":true,"restartPolicy":"Always","securityContext":{},"terminationGracePeriodSeconds":30},"status":{}}}
|
expected: `{"type":"ADDED","object":{"apiVersion":"v1","kind":"Pod","metadata":{"name":"bar","namespace":"test","resourceVersion":"9"},"spec":{"containers":null,"dnsPolicy":"ClusterFirst","enableServiceLinks":true,"restartPolicy":"Always","securityContext":{},"terminationGracePeriodSeconds":30},"status":{}}}
|
||||||
{"type":"ADDED","object":{"apiVersion":"v1","kind":"Pod","metadata":{"creationTimestamp":null,"name":"foo","namespace":"test","resourceVersion":"10"},"spec":{"containers":null,"dnsPolicy":"ClusterFirst","enableServiceLinks":true,"restartPolicy":"Always","securityContext":{},"terminationGracePeriodSeconds":30},"status":{}}}
|
{"type":"ADDED","object":{"apiVersion":"v1","kind":"Pod","metadata":{"name":"foo","namespace":"test","resourceVersion":"10"},"spec":{"containers":null,"dnsPolicy":"ClusterFirst","enableServiceLinks":true,"restartPolicy":"Always","securityContext":{},"terminationGracePeriodSeconds":30},"status":{}}}
|
||||||
{"type":"MODIFIED","object":{"apiVersion":"v1","kind":"Pod","metadata":{"creationTimestamp":null,"name":"foo","namespace":"test","resourceVersion":"11"},"spec":{"containers":null,"dnsPolicy":"ClusterFirst","enableServiceLinks":true,"restartPolicy":"Always","securityContext":{},"terminationGracePeriodSeconds":30},"status":{}}}
|
{"type":"MODIFIED","object":{"apiVersion":"v1","kind":"Pod","metadata":{"name":"foo","namespace":"test","resourceVersion":"11"},"spec":{"containers":null,"dnsPolicy":"ClusterFirst","enableServiceLinks":true,"restartPolicy":"Always","securityContext":{},"terminationGracePeriodSeconds":30},"status":{}}}
|
||||||
{"type":"DELETED","object":{"apiVersion":"v1","kind":"Pod","metadata":{"creationTimestamp":null,"name":"foo","namespace":"test","resourceVersion":"12"},"spec":{"containers":null,"dnsPolicy":"ClusterFirst","enableServiceLinks":true,"restartPolicy":"Always","securityContext":{},"terminationGracePeriodSeconds":30},"status":{}}}
|
{"type":"DELETED","object":{"apiVersion":"v1","kind":"Pod","metadata":{"name":"foo","namespace":"test","resourceVersion":"12"},"spec":{"containers":null,"dnsPolicy":"ClusterFirst","enableServiceLinks":true,"restartPolicy":"Always","securityContext":{},"terminationGracePeriodSeconds":30},"status":{}}}
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -2379,7 +2376,6 @@ DELETED test pod/foo 0/0 0 <unknown> <none>
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
name: bar
|
name: bar
|
||||||
namespace: test
|
namespace: test
|
||||||
resourceVersion: "9"
|
resourceVersion: "9"
|
||||||
|
@ -2397,7 +2393,6 @@ object:
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
name: foo
|
name: foo
|
||||||
namespace: test
|
namespace: test
|
||||||
resourceVersion: "10"
|
resourceVersion: "10"
|
||||||
|
@ -2415,7 +2410,6 @@ object:
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
name: foo
|
name: foo
|
||||||
namespace: test
|
namespace: test
|
||||||
resourceVersion: "11"
|
resourceVersion: "11"
|
||||||
|
@ -2433,7 +2427,6 @@ object:
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
name: foo
|
name: foo
|
||||||
namespace: test
|
namespace: test
|
||||||
resourceVersion: "12"
|
resourceVersion: "12"
|
||||||
|
|
|
@ -280,15 +280,12 @@ func TestRolloutHistoryWithOutput(t *testing.T) {
|
||||||
"kind": "ReplicaSet",
|
"kind": "ReplicaSet",
|
||||||
"apiVersion": "apps/v1",
|
"apiVersion": "apps/v1",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "rev2",
|
"name": "rev2"
|
||||||
"creationTimestamp": null
|
|
||||||
},
|
},
|
||||||
"spec": {
|
"spec": {
|
||||||
"selector": null,
|
"selector": null,
|
||||||
"template": {
|
"template": {
|
||||||
"metadata": {
|
"metadata": {},
|
||||||
"creationTimestamp": null
|
|
||||||
},
|
|
||||||
"spec": {
|
"spec": {
|
||||||
"containers": null
|
"containers": null
|
||||||
}
|
}
|
||||||
|
@ -305,13 +302,11 @@ func TestRolloutHistoryWithOutput(t *testing.T) {
|
||||||
expectedOutput: `apiVersion: apps/v1
|
expectedOutput: `apiVersion: apps/v1
|
||||||
kind: ReplicaSet
|
kind: ReplicaSet
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
name: rev2
|
name: rev2
|
||||||
spec:
|
spec:
|
||||||
selector: null
|
selector: null
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata: {}
|
||||||
creationTimestamp: null
|
|
||||||
spec:
|
spec:
|
||||||
containers: null
|
containers: null
|
||||||
status:
|
status:
|
||||||
|
@ -323,13 +318,11 @@ status:
|
||||||
expectedOutput: `apiVersion: apps/v1
|
expectedOutput: `apiVersion: apps/v1
|
||||||
kind: ReplicaSet
|
kind: ReplicaSet
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
name: rev1
|
name: rev1
|
||||||
spec:
|
spec:
|
||||||
selector: null
|
selector: null
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata: {}
|
||||||
creationTimestamp: null
|
|
||||||
spec:
|
spec:
|
||||||
containers: null
|
containers: null
|
||||||
status:
|
status:
|
||||||
|
@ -338,13 +331,11 @@ status:
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: ReplicaSet
|
kind: ReplicaSet
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
name: rev2
|
name: rev2
|
||||||
spec:
|
spec:
|
||||||
selector: null
|
selector: null
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata: {}
|
||||||
creationTimestamp: null
|
|
||||||
spec:
|
spec:
|
||||||
containers: null
|
containers: null
|
||||||
status:
|
status:
|
||||||
|
|
|
@ -655,7 +655,6 @@ func TestRunOverride(t *testing.T) {
|
||||||
expectedOutput: `apiVersion: v1
|
expectedOutput: `apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
labels:
|
||||||
run: test
|
run: test
|
||||||
name: test
|
name: test
|
||||||
|
@ -678,7 +677,6 @@ status: {}
|
||||||
expectedOutput: `apiVersion: v1
|
expectedOutput: `apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
labels:
|
||||||
run: test
|
run: test
|
||||||
name: test
|
name: test
|
||||||
|
@ -701,7 +699,6 @@ status: {}
|
||||||
expectedOutput: `apiVersion: v1
|
expectedOutput: `apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
labels:
|
||||||
run: test
|
run: test
|
||||||
name: test
|
name: test
|
||||||
|
@ -729,7 +726,6 @@ status: {}
|
||||||
expectedOutput: `apiVersion: v1
|
expectedOutput: `apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
labels:
|
||||||
foo: bar
|
foo: bar
|
||||||
run: test
|
run: test
|
||||||
|
|
|
@ -62,7 +62,7 @@ func TestGetDeploymentPatch(t *testing.T) {
|
||||||
t.Errorf("expected strategic merge patch, got %v", patchType)
|
t.Errorf("expected strategic merge patch, got %v", patchType)
|
||||||
}
|
}
|
||||||
expectedPatch := `[` +
|
expectedPatch := `[` +
|
||||||
`{"op":"replace","path":"/spec/template","value":{"metadata":{"creationTimestamp":null},"spec":{"containers":[{"name":"","image":"foo","resources":{}}]}}},` +
|
`{"op":"replace","path":"/spec/template","value":{"metadata":{},"spec":{"containers":[{"name":"","image":"foo","resources":{}}]}}},` +
|
||||||
`{"op":"replace","path":"/metadata/annotations","value":{"a":"true"}}` +
|
`{"op":"replace","path":"/metadata/annotations","value":{"a":"true"}}` +
|
||||||
`]`
|
`]`
|
||||||
if string(patchBytes) != expectedPatch {
|
if string(patchBytes) != expectedPatch {
|
||||||
|
|
|
@ -3,7 +3,7 @@ kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
deployment.kubernetes.io/revision: "1"
|
deployment.kubernetes.io/revision: "1"
|
||||||
kubectl.kubernetes.io/last-applied-configuration: '{"kind":"Deployment","apiVersion":"apps/v1","metadata":{"name":"nginx-deployment","creationTimestamp":null,"labels":{"name":"nginx"}},"spec":{"selector":{"matchLabels":{"name":"nginx"}},"template":{"metadata":{"creationTimestamp":null,"labels":{"name":"nginx"}},"spec":{"containers":[{"name":"nginx","image":"nginx","resources":{}}]}},"strategy":{}},"status":{}}'
|
kubectl.kubernetes.io/last-applied-configuration: '{"kind":"Deployment","apiVersion":"apps/v1","metadata":{"name":"nginx-deployment","labels":{"name":"nginx"}},"spec":{"selector":{"matchLabels":{"name":"nginx"}},"template":{"metadata":{"labels":{"name":"nginx"}},"spec":{"containers":[{"name":"nginx","image":"nginx","resources":{}}]}},"strategy":{}},"status":{}}'
|
||||||
creationTimestamp: "2016-10-24T22:15:06Z"
|
creationTimestamp: "2016-10-24T22:15:06Z"
|
||||||
generation: 6
|
generation: 6
|
||||||
labels:
|
labels:
|
||||||
|
@ -25,7 +25,6 @@ spec:
|
||||||
type: RollingUpdate
|
type: RollingUpdate
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
labels:
|
||||||
name: nginx
|
name: nginx
|
||||||
spec:
|
spec:
|
||||||
|
|
|
@ -77,7 +77,6 @@ spec:
|
||||||
name: test-rc
|
name: test-rc
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
|
||||||
labels:
|
labels:
|
||||||
name: test-rc
|
name: test-rc
|
||||||
spec:
|
spec:
|
||||||
|
|
Loading…
Reference in New Issue