Skip to content

Commit 00e9eba

Browse files
committed
Fix tests.
1 parent 957492b commit 00e9eba

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

util/src/test/java/io/kubernetes/client/util/YamlTest.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ public class YamlTest {
5454
"Deployment",
5555
"APIService",
5656
"Scale",
57-
"Deployment"
5857
};
5958
private static final String[] apiVersions =
6059
new String[] {
@@ -64,19 +63,17 @@ public class YamlTest {
6463
"rbac.authorization.k8s.io/v1alpha1",
6564
"apps/v1",
6665
"apiregistration.k8s.io/v1beta1",
67-
"extensions/v1beta1",
68-
"apps/v1beta1"
66+
"apps/v1",
6967
};
7068
private static final String[] classNames =
7169
new String[] {
7270
"V1Pod",
7371
"V2alpha1CronJob",
7472
"V2beta1HorizontalPodAutoscaler",
7573
"V1alpha1ClusterRole",
76-
"V1beta2Deployment",
74+
"V1Deployment",
7775
"V1beta1APIService",
78-
"ExtensionsV1beta1Scale",
79-
"V1Deployment"
76+
"V1Scale",
8077
};
8178
private static final String input =
8279
"kind: " + "XXXX" + "\n" + "apiVersion: " + "YYYY" + "\n" + "metadata:\n" + " name: foo";
@@ -137,7 +134,7 @@ public void testLoadAllFile() throws Exception {
137134
assertEquals("mock", svc.getMetadata().getName());
138135
} else if (type.equals("V1Deployment")) {
139136
V1Deployment deploy = (V1Deployment) object;
140-
assertEquals("apps/v1beta1", deploy.getApiVersion());
137+
assertEquals("apps/v1", deploy.getApiVersion());
141138
assertEquals("Deployment", deploy.getKind());
142139
assertEquals("helloworld", deploy.getMetadata().getName());
143140
} else if (type.equals("V1Secret")) {

util/src/test/resources/expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spec:
1212
selector:
1313
app: mock
1414
---
15-
apiVersion: apps/v1beta1
15+
apiVersion: apps/v1
1616
kind: Deployment
1717
metadata:
1818
labels:

util/src/test/resources/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spec:
1212
selector:
1313
app: mock
1414
---
15-
apiVersion: apps/v1beta1
15+
apiVersion: apps/v1
1616
kind: Deployment
1717
metadata:
1818
labels:

0 commit comments

Comments
 (0)