Skip to content

Commit

Permalink
fix : Remove assertExpose() from ServiceAssertion
Browse files Browse the repository at this point in the history
Now that we're removing ExposeEnricher, there is no need to verify
whether generated Service contains `expose: true` label.

Signed-off-by: Rohan Kumar <[email protected]>
  • Loading branch information
rohanKanojia committed Jun 8, 2022
1 parent 8b42435 commit 4a66469
Show file tree
Hide file tree
Showing 14 changed files with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ public static ServiceAssertion awaitService(JKubeCase jKubeCase, String namespac
return assertService(service).apply(jKubeCase);
}

public ServiceAssertion assertExposed() {
assertThat(getKubernetesResource().getMetadata().getLabels(), hasEntry("expose", "true"));
return this;
}

public ServiceAssertion assertIsClusterIp() {
assertThat(getKubernetesResource().getSpec().getType(), equalTo("ClusterIP"));
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ final Pod assertThatShouldApplyResources() throws Exception {
.logContains("Started Application in", 40)
.getKubernetesResource();
awaitService(this, pod.getMetadata().getNamespace())
.assertExposed()
.assertIsNodePort()
.assertPorts(hasSize(1))
.assertPort("http", 8080, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ final Pod assertThatShouldApplyResources() throws Exception {
LOG_TIMEOUT);
awaitService(this, pod.getMetadata().getNamespace())
.assertIsNodePort()
.assertExposed()
.assertPorts(hasSize(1))
.assertPort("glrpc", 9080, true)
.assertNodePortResponse("glrpc", equalTo("Hello, World."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ final Pod assertThatShouldApplyResources() throws Exception {
assertPod(pod).apply(this).logContains("quarkus-native 0.0.0-SNAPSHOT native (powered by Quarkus 2.8.3.Final) started in", 60);
awaitService(this, pod.getMetadata().getNamespace())
.assertIsNodePort()
.assertExposed()
.assertPorts(hasSize(1))
.assertPort("http", 8080, true)
.assertNodePortResponse("http",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ final Pod assertThatShouldApplyResources() throws Exception {
assertPod(pod).apply(this).logContains("quarkus-rest 0.0.0-SNAPSHOT on JVM (powered by Quarkus 2.8.3.Final) started in", 60);
awaitService(this, pod.getMetadata().getNamespace())
.assertIsNodePort()
.assertExposed()
.assertPorts(hasSize(1))
.assertPort("http", 8080, true)
.assertNodePortResponse("http",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ final Pod assertThatShouldApplyResources() throws Exception {
assertFrameworkCustomResourceDefinitionApplied(this);
assertFrameworkCustomResourcesApplied(this, namespace);
awaitService(this, namespace)
.assertExposed()
.assertPorts(hasSize(1))
.assertPort("http", 8080, true)
.assertNodePortResponse("http",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ final Pod assertThatShouldApplyResources() throws Exception {
.logContains("Started ZeroConfigApplication in", 40)
.getKubernetesResource();
awaitService(this, pod.getMetadata().getNamespace())
.assertExposed()
.assertPorts(hasSize(1))
.assertPort("http", 8080, false);
return pod;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ final Pod assertThatShouldApplyResources() throws Exception {
assertPod(pod).apply(this).logContains("Deployed \"thorntail-microprofile-0.0.0-SNAPSHOT.war\"", 60);
awaitService(this, pod.getMetadata().getNamespace())
.assertIsNodePort()
.assertExposed()
.assertPorts(hasSize(1))
.assertPort("http", 8080, true)
.assertNodePortResponse("http", equalTo("JKube from Thorntail rocks!"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ final Pod assertThatShouldApplyResources() throws Exception {
assertPod(pod).apply(this).logContains("Succeeded in deploying verticle", 60);
awaitService(this, pod.getMetadata().getNamespace())
.assertIsNodePort()
.assertExposed()
.assertPorts(hasSize(1))
.assertPort("http", 8080, true)
.assertNodePortResponse("http", equalTo("Hello from JKube!"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ final Pod assertThatShouldApplyResources() throws Exception {
final Pod pod = awaitPod(this).getKubernetesResource();
assertPod(pod).apply(this).logContains("Server:main: Started", 60);
awaitService(this, pod.getMetadata().getNamespace())
.assertExposed()
.assertPorts(hasSize(1))
.assertPort("http", 8080, true)
.assertNodePortResponse("http", containsString("<h2>Eclipse JKube on Jetty rocks!</h2>"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ final Pod assertThatShouldApplyResources() throws Exception{
assertPod(pod).apply(this).logContains("Deployed", 60);
awaitService(this, pod.getMetadata().getNamespace())
.assertIsNodePort()
.assertExposed()
.assertPorts(hasSize(1))
.assertPort("http", 8080, true)
.assertNodePortResponse("http", containsString("<h2>Eclipse JKube rocks!!</h2>"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ final Pod assertThatShouldApplyResources() throws Exception {
final Pod pod = awaitPod(this).getKubernetesResource();
assertPod(pod).apply(this).logContains("Catalina.start Server startup", 60);
awaitService(this, pod.getMetadata().getNamespace())
.assertExposed()
.assertPorts(hasSize(1))
.assertPort("http", 8080, false);
return pod;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ final Pod assertThatShouldApplyResources() throws Exception {
.logContains("WFLYSRV0025", 15);
awaitService(this, pod.getMetadata().getNamespace())
.assertIsNodePort()
.assertExposed()
.assertPorts(hasSize(1))
.assertPort("http", 8080, true)
.assertNodePortResponse("http", equalTo("JKube from WildFly JAR rocks!"));
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<fabric8.kubernetes-client.version>5.12.2</fabric8.kubernetes-client.version>
<gradle.version>6.1.1</gradle.version>
<hamcrest.version>2.0.0.0</hamcrest.version>
<jkube.version>1.8.0-SNAPSHOT</jkube.version>
<jkube.version>1.9.0-SNAPSHOT</jkube.version>
<junit.version>5.8.2</junit.version>
<karaf.version>4.4.0</karaf.version>
<license-maven-plugin.version>3.0</license-maven-plugin.version>
Expand Down

0 comments on commit 4a66469

Please sign in to comment.