Skip to content

Commit

Permalink
Fix up test cases
Browse files Browse the repository at this point in the history
Change-Id: Ib9245f78dbfb88f1f37a26ca64bf80d3f78d7497
  • Loading branch information
dims committed Oct 10, 2018
1 parent 6364af1 commit 65da81f
Show file tree
Hide file tree
Showing 57 changed files with 80 additions and 76 deletions.
2 changes: 1 addition & 1 deletion hack/testdata/sorted-pods/sorted-pod1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Pod
metadata:
name: sorted-pod1
creationTimestamp: 2018-08-30T14:10:58Z
creationTimestamp: "2018-08-30T14:10:58Z"
labels:
name: sorted-pod3-label
spec:
Expand Down
2 changes: 1 addition & 1 deletion hack/testdata/sorted-pods/sorted-pod2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Pod
metadata:
name: sorted-pod2
creationTimestamp: 2018-08-30T14:10:55Z
creationTimestamp: "2018-08-30T14:10:55Z"
labels:
name: sorted-pod2-label
spec:
Expand Down
2 changes: 1 addition & 1 deletion hack/testdata/sorted-pods/sorted-pod3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Pod
metadata:
name: sorted-pod3
creationTimestamp: 2018-08-30T14:10:53Z
creationTimestamp: "2018-08-30T14:10:53Z"
labels:
name: sorted-pod1-label
spec:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Please edit the 'last-applied-configuration' annotations below.
# Lines beginning with a '#' will be ignored, and an empty file will abort the edit.
#
# The edited file had a syntax error: error converting YAML to JSON: yaml: line 12: could not find expected ':'
# The edited file had a syntax error: error converting YAML to JSON: yaml: line 13: could not find expected ':'
#
kind: Service
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Please edit the 'last-applied-configuration' annotations below.
# Lines beginning with a '#' will be ignored, and an empty file will abort the edit.
#
# The edited file had a syntax error: error parsing edited-file: error converting YAML to JSON: yaml: line 12: could not find expected ':'
# The edited file had a syntax error: error parsing edited-file: error converting YAML to JSON: yaml: line 13: could not find expected ':'
#
kind: Service
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apiVersion: v1
kind: Service
metadata:
annotations: {}
creationTimestamp: 2017-02-01T21:14:09Z
creationTimestamp: "2017-02-01T21:14:09Z"
labels:
app: svc1
new-label: new-value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apiVersion: v1
kind: Service
metadata:
annotations: {}
creationTimestamp: 2017-02-01T21:14:09Z
creationTimestamp: "2017-02-01T21:14:09Z"
labels:
app: svc1
new-label: new-value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-02-03T06:44:47Z
creationTimestamp: "2017-02-03T06:44:47Z"
labels:
app: svc1modified
name: svc1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-02-03T06:44:47Z
creationTimestamp: "2017-02-03T06:44:47Z"
labels:
app: svc1
name: svc1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-02-03T06:44:43Z
creationTimestamp: "2017-02-03T06:44:43Z"
labels:
app: svc2modified
name: svc2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-02-03T06:44:43Z
creationTimestamp: "2017-02-03T06:44:43Z"
labels:
app: svc2
name: svc2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ items:
- apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-02-03T06:44:47Z
creationTimestamp: "2017-02-03T06:44:47Z"
labels:
app: svc1
name: svc1
Expand All @@ -27,7 +27,7 @@ items:
- apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-02-03T06:44:43Z
creationTimestamp: "2017-02-03T06:44:43Z"
labels:
app: svc2
name: svc2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-02-01T21:14:09Z
creationTimestamp: "2017-02-01T21:14:09Z"
labels:
app: svc1
new-label: new-value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-02-01T21:14:09Z
creationTimestamp: "2017-02-01T21:14:09Z"
labels:
app: svc1
new-label: new-value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-02-01T21:14:09Z
creationTimestamp: "2017-02-01T21:14:09Z"
labels:
app: svc1
new-label: new-value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-02-01T21:14:09Z
creationTimestamp: "2017-02-01T21:14:09Z"
labels:
app: svc1
new-label: new-value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
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":{}}}
creationTimestamp: 2017-02-27T19:40:53Z
creationTimestamp: "2017-02-27T19:40:53Z"
labels:
app: svc1
new-label: new-value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
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":{}}}
creationTimestamp: 2017-02-27T19:40:53Z
creationTimestamp: "2017-02-27T19:40:53Z"
labels:
app: svc1
name: svc1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ data:
foo: changed-value2
kind: ConfigMap
metadata:
creationTimestamp: 2017-02-03T06:12:07Z
creationTimestamp: "2017-02-03T06:12:07Z"
name: cm1-modified
namespace: edit-test
resourceVersion: "2071"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ data:
foo: changed-value2
kind: ConfigMap
metadata:
creationTimestamp: 2017-02-03T06:12:07Z
creationTimestamp: "2017-02-03T06:12:07Z"
name: cm1
namespace: edit-test
resourceVersion: "2071"
Expand Down
4 changes: 2 additions & 2 deletions pkg/kubectl/cmd/edit/testdata/testcase-list-errors/2.edited
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ items:
- apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-02-03T06:11:32Z
creationTimestamp: "2017-02-03T06:11:32Z"
labels:
app: svc1
name: svc1
Expand All @@ -32,7 +32,7 @@ items:
foo: changed-value2
kind: ConfigMap
metadata:
creationTimestamp: 2017-02-03T06:12:07Z
creationTimestamp: "2017-02-03T06:12:07Z"
name: cm1
namespace: edit-test
resourceVersion: "1903"
Expand Down
4 changes: 2 additions & 2 deletions pkg/kubectl/cmd/edit/testdata/testcase-list-errors/2.original
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ items:
foo: changed-value
kind: ConfigMap
metadata:
creationTimestamp: 2017-02-03T06:12:07Z
creationTimestamp: "2017-02-03T06:12:07Z"
name: cm1
namespace: edit-test
resourceVersion: "1903"
Expand All @@ -19,7 +19,7 @@ items:
- apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-02-03T06:11:32Z
creationTimestamp: "2017-02-03T06:11:32Z"
labels:
app: svc1
name: svc1
Expand Down
4 changes: 2 additions & 2 deletions pkg/kubectl/cmd/edit/testdata/testcase-list-errors/5.edited
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ items:
- apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-02-03T06:11:32Z
creationTimestamp: "2017-02-03T06:11:32Z"
labels:
app: svc1
newvalue: modified
Expand All @@ -37,7 +37,7 @@ items:
foo: changed-value2
kind: ConfigMap
metadata:
creationTimestamp: 2017-02-03T06:12:07Z
creationTimestamp: "2017-02-03T06:12:07Z"
name: cm1
namespace: edit-test
resourceVersion: "1903"
Expand Down
4 changes: 2 additions & 2 deletions pkg/kubectl/cmd/edit/testdata/testcase-list-errors/5.original
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ items:
- apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-02-03T06:11:32Z
creationTimestamp: "2017-02-03T06:11:32Z"
labels:
app: svc1
name: svc1
Expand All @@ -36,7 +36,7 @@ items:
foo: changed-value2
kind: ConfigMap
metadata:
creationTimestamp: 2017-02-03T06:12:07Z
creationTimestamp: "2017-02-03T06:12:07Z"
name: cm1
namespace: edit-test
resourceVersion: "1903"
Expand Down
4 changes: 2 additions & 2 deletions pkg/kubectl/cmd/edit/testdata/testcase-list-errors/8.edited
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ items:
- apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-02-03T06:11:32Z
creationTimestamp: "2017-02-03T06:11:32Z"
labels:
app: svc1
newvalue: modified
Expand All @@ -36,7 +36,7 @@ items:
foo: changed-value2
kind: ConfigMap
metadata:
creationTimestamp: 2017-02-03T06:12:07Z
creationTimestamp: "2017-02-03T06:12:07Z"
name: cm1
namespace: edit-test
resourceVersion: "1903"
Expand Down
4 changes: 2 additions & 2 deletions pkg/kubectl/cmd/edit/testdata/testcase-list-errors/8.original
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ items:
- apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-02-03T06:11:32Z
creationTimestamp: "2017-02-03T06:11:32Z"
labels:
app: svc1
newvalue: modified
Expand All @@ -36,7 +36,7 @@ items:
foo: changed-value2
kind: ConfigMap
metadata:
creationTimestamp: 2017-02-03T06:12:07Z
creationTimestamp: "2017-02-03T06:12:07Z"
name: cm1
namespace: edit-test
resourceVersion: "1903"
Expand Down
4 changes: 2 additions & 2 deletions pkg/kubectl/cmd/edit/testdata/testcase-list-record/2.edited
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ items:
metadata:
annotations:
kubernetes.io/change-cause: original creating command a
creationTimestamp: 2017-02-03T06:12:07Z
creationTimestamp: "2017-02-03T06:12:07Z"
name: cm1
namespace: edit-test
resourceVersion: "1414"
Expand All @@ -26,7 +26,7 @@ items:
metadata:
annotations:
kubernetes.io/change-cause: original creating command b
creationTimestamp: 2017-02-03T06:11:32Z
creationTimestamp: "2017-02-03T06:11:32Z"
labels:
app: svc1
new-label: foo
Expand Down
4 changes: 2 additions & 2 deletions pkg/kubectl/cmd/edit/testdata/testcase-list-record/2.original
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ items:
metadata:
annotations:
kubernetes.io/change-cause: original creating command a
creationTimestamp: 2017-02-03T06:12:07Z
creationTimestamp: "2017-02-03T06:12:07Z"
name: cm1
namespace: edit-test
resourceVersion: "1414"
Expand All @@ -25,7 +25,7 @@ items:
metadata:
annotations:
kubernetes.io/change-cause: original creating command b
creationTimestamp: 2017-02-03T06:11:32Z
creationTimestamp: "2017-02-03T06:11:32Z"
labels:
app: svc1
new-label: foo
Expand Down
4 changes: 2 additions & 2 deletions pkg/kubectl/cmd/edit/testdata/testcase-list/2.edited
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ items:
new-data3: newivalue
kind: ConfigMap
metadata:
creationTimestamp: 2017-02-03T06:12:07Z
creationTimestamp: "2017-02-03T06:12:07Z"
name: cm1
namespace: edit-test
resourceVersion: "1414"
Expand All @@ -22,7 +22,7 @@ items:
- apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-02-03T06:11:32Z
creationTimestamp: "2017-02-03T06:11:32Z"
labels:
app: svc1
new-label: foo
Expand Down
4 changes: 2 additions & 2 deletions pkg/kubectl/cmd/edit/testdata/testcase-list/2.original
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ items:
new-data2: new-value
kind: ConfigMap
metadata:
creationTimestamp: 2017-02-03T06:12:07Z
creationTimestamp: "2017-02-03T06:12:07Z"
name: cm1
namespace: edit-test
resourceVersion: "1414"
Expand All @@ -21,7 +21,7 @@ items:
- apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-02-03T06:11:32Z
creationTimestamp: "2017-02-03T06:11:32Z"
labels:
app: svc1
new-label: foo
Expand Down
2 changes: 1 addition & 1 deletion pkg/kubectl/cmd/edit/testdata/testcase-no-op/1.edited
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
creationTimestamp: 2017-02-03T05:59:00Z
creationTimestamp: "2017-02-03T05:59:00Z"
name: mymap
namespace: default
resourceVersion: "149"
Expand Down
2 changes: 1 addition & 1 deletion pkg/kubectl/cmd/edit/testdata/testcase-no-op/1.original
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
creationTimestamp: 2017-02-03T05:59:00Z
creationTimestamp: "2017-02-03T05:59:00Z"
name: mymap
namespace: default
resourceVersion: "149"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
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":{}}}
creationTimestamp: 2017-02-27T19:40:53Z
creationTimestamp: "2017-02-27T19:40:53Z"
labels:
app: svc1
new-label: new-value
Expand Down
Loading

0 comments on commit 65da81f

Please sign in to comment.