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 Apr 11, 2022
1 parent 60af4aa commit 5df04a8
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 @@ -179,7 +179,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 @@ -153,7 +153,6 @@ final Pod assertThatShouldApplyResources() throws Exception {
assertPod(pod).apply(this).logContains("quarkus-native 0.0.0-SNAPSHOT native (powered by Quarkus 1.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 1.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 InterruptedException, IOExcept
.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 @@ -43,7 +43,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 @@ -48,7 +48,6 @@ final Pod assertThatShouldApplyResources() throws InterruptedException, IOExcept
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 @@ -38,7 +38,7 @@
<com.fasterxml.jackson.core.version>2.13.1</com.fasterxml.jackson.core.version>
<com.fasterxml.jackson.dataformat.yaml.version>2.13.1</com.fasterxml.jackson.dataformat.yaml.version>
<fabric8.kubernetes-client.version>5.11.2</fabric8.kubernetes-client.version>
<jkube.version>1.7.0-SNAPSHOT</jkube.version>
<jkube.version>1.8.0-SNAPSHOT</jkube.version>
<junit.version>5.8.1</junit.version>
<license-maven-plugin.version>3.0</license-maven-plugin.version>
<hamcrest.version>2.0.0.0</hamcrest.version>
Expand Down

0 comments on commit 5df04a8

Please sign in to comment.