Search in sources :

Example 1 with And

use of io.cucumber.java.en.And in project cos-fleetshard by bf2fc6cc711aee1a0c2a.

the class KameletBindingSecretSteps method klb_secret_label_contains.

@And("the klb secret has labels containing:")
public void klb_secret_label_contains(DataTable table) {
    Secret secret = secret();
    assertThat(secret).isNotNull();
    assertThatDataTable(table, ctx::resolvePlaceholders).matches(secret.getMetadata().getLabels());
}
Also used : Secret(io.fabric8.kubernetes.api.model.Secret) And(io.cucumber.java.en.And)

Example 2 with And

use of io.cucumber.java.en.And in project cos-fleetshard by bf2fc6cc711aee1a0c2a.

the class KameletBindingSecretSteps method klb_secret_annotation_contains.

@And("the klb secret has annotations containing:")
public void klb_secret_annotation_contains(DataTable table) {
    Secret secret = secret();
    assertThat(secret).isNotNull();
    assertThatDataTable(table, ctx::resolvePlaceholders).matches(secret.getMetadata().getAnnotations());
}
Also used : Secret(io.fabric8.kubernetes.api.model.Secret) And(io.cucumber.java.en.And)

Example 3 with And

use of io.cucumber.java.en.And in project cos-fleetshard by bf2fc6cc711aee1a0c2a.

the class KameletBindingSecretSteps method klb_has_a_path_matching_value.

@And("the klb secret has an entry at path {string} with value {bool}")
public void klb_has_a_path_matching_value(String path, Boolean value) {
    Secret secret = secret();
    assertThat(secret).isNotNull();
    assertThatJson(JacksonUtil.asJsonNode(secret)).inPath(path).isBoolean().isEqualTo(value);
}
Also used : Secret(io.fabric8.kubernetes.api.model.Secret) And(io.cucumber.java.en.And)

Example 4 with And

use of io.cucumber.java.en.And in project cos-fleetshard by bf2fc6cc711aee1a0c2a.

the class KameletBindingSteps method klb_has_a_path_matching_value.

@And("the klb has an entry at path {string} with value {int}")
public void klb_has_a_path_matching_value(String path, int value) {
    KameletBinding res = klb();
    assertThat(res).isNotNull();
    assertThatJson(JacksonUtil.asJsonNode(res)).inPath(path).isNumber().isEqualTo(value);
}
Also used : KameletBinding(org.bf2.cos.fleetshard.operator.camel.model.KameletBinding) And(io.cucumber.java.en.And)

Example 5 with And

use of io.cucumber.java.en.And in project cos-fleetshard by bf2fc6cc711aee1a0c2a.

the class KameletBindingSteps method klb_has_an_empty_object_at_path.

@And("the klb has an empty object at path {string}")
public void klb_has_an_empty_object_at_path(String path) {
    KameletBinding res = klb();
    assertThat(res).isNotNull();
    assertThatJson(JacksonUtil.asJsonNode(res)).inPath(path).isObject().isEmpty();
}
Also used : KameletBinding(org.bf2.cos.fleetshard.operator.camel.model.KameletBinding) And(io.cucumber.java.en.And)

Aggregations

And (io.cucumber.java.en.And)33 KafkaConnect (io.strimzi.api.kafka.model.KafkaConnect)8 KafkaConnector (io.strimzi.api.kafka.model.KafkaConnector)8 KameletBinding (org.bf2.cos.fleetshard.operator.camel.model.KameletBinding)8 JsonNode (com.fasterxml.jackson.databind.JsonNode)6 Secret (io.fabric8.kubernetes.api.model.Secret)6 DataTable (io.cucumber.datatable.DataTable)3 Then (io.cucumber.java.en.Then)3 When (io.cucumber.java.en.When)3 Serialization (io.fabric8.kubernetes.client.utils.Serialization)3 Consumer (java.util.function.Consumer)3 Collectors (java.util.stream.Collectors)3 JsonAssertions.assertThatJson (net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson)3 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)3 CucumberAssertions.assertThatDataTable (org.bf2.cos.fleetshard.it.cucumber.assertions.CucumberAssertions.assertThatDataTable)3 StepsSupport (org.bf2.cos.fleetshard.it.cucumber.support.StepsSupport)3 JacksonUtil (org.bf2.cos.fleetshard.support.json.JacksonUtil)3 FailureException (com.github.noraui.exception.FailureException)2 Result (com.github.noraui.exception.Result)2 Et (io.cucumber.java.fr.Et)2