This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
The following commit(s) were added to refs/heads/dev by this push:
new 827fe3244 [FIX] fix failure test of testHostAliasSpecToPodTemplate
(#2797)
827fe3244 is described below
commit 827fe32449a25d05a73999a59727f782529e69ff
Author: zhoulii <[email protected]>
AuthorDate: Wed Jun 14 12:45:24 2023 +0800
[FIX] fix failure test of testHostAliasSpecToPodTemplate (#2797)
Co-authored-by: zhoulii <[email protected]>
---
.../flink/kubernetes/PodTemplateParserTest.scala | 34 +++++++++++-----------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git
a/streampark-flink/streampark-flink-kubernetes/src/test/scala/org/apache/streampark/flink/kubernetes/PodTemplateParserTest.scala
b/streampark-flink/streampark-flink-kubernetes/src/test/scala/org/apache/streampark/flink/kubernetes/PodTemplateParserTest.scala
index e9083db7b..3c1570388 100644
---
a/streampark-flink/streampark-flink-kubernetes/src/test/scala/org/apache/streampark/flink/kubernetes/PodTemplateParserTest.scala
+++
b/streampark-flink/streampark-flink-kubernetes/src/test/scala/org/apache/streampark/flink/kubernetes/PodTemplateParserTest.scala
@@ -132,10 +132,6 @@ class PodTemplateParserTest {
| name: pod-template
|spec:
| hostAliases:
- | - ip: 192.168.3.114
- | hostnames:
- | - hdp01
- | - hdp01.assad.site
| - ip: 192.168.3.116
| hostnames:
| - hdp03.assad.site
@@ -143,6 +139,10 @@ class PodTemplateParserTest {
| hostnames:
| - hdp02
| - hdp02.assad.site
+ | - ip: 192.168.3.114
+ | hostnames:
+ | - hdp01
+ | - hdp01.assad.site
|""".stripMargin,
"""apiVersion: v1
|kind: Pod
@@ -156,10 +156,6 @@ class PodTemplateParserTest {
| name: pod-template
|spec:
| hostAliases:
- | - ip: 192.168.3.114
- | hostnames:
- | - hdp01
- | - hdp01.assad.site
| - ip: 192.168.3.116
| hostnames:
| - hdp03.assad.site
@@ -167,6 +163,10 @@ class PodTemplateParserTest {
| hostnames:
| - hdp02
| - hdp02.assad.site
+ | - ip: 192.168.3.114
+ | hostnames:
+ | - hdp01
+ | - hdp01.assad.site
|""".stripMargin,
"""apiVersion: v1
|kind: Pod
@@ -185,10 +185,6 @@ class PodTemplateParserTest {
| name: pod-template
|spec:
| hostAliases:
- | - ip: 192.168.3.114
- | hostnames:
- | - hdp01
- | - hdp01.assad.site
| - ip: 192.168.3.116
| hostnames:
| - hdp03.assad.site
@@ -196,6 +192,10 @@ class PodTemplateParserTest {
| hostnames:
| - hdp02
| - hdp02.assad.site
+ | - ip: 192.168.3.114
+ | hostnames:
+ | - hdp01
+ | - hdp01.assad.site
|""".stripMargin,
"""apiVersion: v1
|kind: Pod
@@ -237,10 +237,6 @@ class PodTemplateParserTest {
| persistentVolumeClaim:
| claimName: flink-savepoint
| hostAliases:
- | - ip: 192.168.3.114
- | hostnames:
- | - hdp01
- | - hdp01.assad.site
| - ip: 192.168.3.116
| hostnames:
| - hdp03.assad.site
@@ -248,11 +244,15 @@ class PodTemplateParserTest {
| hostnames:
| - hdp02
| - hdp02.assad.site
+ | - ip: 192.168.3.114
+ | hostnames:
+ | - hdp01
+ | - hdp01.assad.site
|""".stripMargin
)
for (expect <- expected) {
val result = PodTemplateParser.completeHostAliasSpec(hostMap, expect._1)
- assertEquals(result, expect._2)
+ assertEquals(expect._2, result)
}
}