Skip to content

Commit 40e8ca0

Browse files
committed
test
Signed-off-by: Attila Mészáros <[email protected]>
1 parent c5b9700 commit 40e8ca0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

flink-kubernetes-operator/src/test/java/org/apache/flink/kubernetes/operator/controller/FlinkDeploymentControllerTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
import static org.apache.flink.kubernetes.operator.config.KubernetesOperatorConfigOptions.OPERATOR_JOB_UPGRADE_LAST_STATE_FALLBACK_ENABLED;
6969
import static org.apache.flink.kubernetes.operator.config.KubernetesOperatorConfigOptions.SNAPSHOT_RESOURCE_ENABLED;
7070
import static org.apache.flink.kubernetes.operator.utils.EventRecorder.Reason.ValidationError;
71+
import static org.assertj.core.api.Assertions.assertThat;
7172
import static org.junit.jupiter.api.Assertions.assertEquals;
7273
import static org.junit.jupiter.api.Assertions.assertFalse;
7374
import static org.junit.jupiter.api.Assertions.assertNotEquals;
@@ -934,7 +935,6 @@ public void cleanUpNewDeployment() {
934935
assertTrue(testController.getContextFactory().getMetricGroups().isEmpty());
935936
}
936937

937-
// todo add test here
938938
@Test
939939
public void testIngressLifeCycle() throws Exception {
940940
FlinkDeployment appNoIngress = TestUtils.buildApplicationCluster();
@@ -984,6 +984,9 @@ public void testIngressLifeCycle() throws Exception {
984984
appWithIngress.getMetadata().getName(),
985985
appWithIngress.getMetadata().getNamespace())
986986
.getHost());
987+
assertThat(ingress.getMetadata().getOwnerReferences()).hasSize(1);
988+
assertThat(ingress.getMetadata().getOwnerReferences().get(0).getKind())
989+
.isEqualTo(FlinkDeployment.class.getSimpleName());
987990
}
988991

989992
@Test

0 commit comments

Comments
 (0)