use of io.strimzi.operator.common.InvalidConfigurationException in project strimzi-kafka-operator by strimzi.
the class FeatureGatesTest method testMissingSign.
@ParallelTest
public void testMissingSign() {
InvalidConfigurationException e = assertThrows(InvalidConfigurationException.class, () -> new FeatureGates("ControlPlaneListener"));
assertThat(e.getMessage(), containsString("ControlPlaneListener is not a valid feature gate configuration"));
}
use of io.strimzi.operator.common.InvalidConfigurationException in project strimzi-kafka-operator by strimzi.
the class FeatureGatesTest method testNonExistingGate.
@ParallelTest
public void testNonExistingGate() {
InvalidConfigurationException e = assertThrows(InvalidConfigurationException.class, () -> new FeatureGates("+RandomGate"));
assertThat(e.getMessage(), containsString("Unknown feature gate RandomGate found in the configuration"));
}
use of io.strimzi.operator.common.InvalidConfigurationException in project strimzi by strimzi.
the class ClusterOperatorConfigTest method testInvalidCustomResourceSelectorLabels.
@Test
public void testInvalidCustomResourceSelectorLabels() {
Map<String, String> envVars = new HashMap<>(ClusterOperatorConfigTest.ENV_VARS);
envVars.put(ClusterOperatorConfig.STRIMZI_CUSTOM_RESOURCE_SELECTOR, "nsLabelKey1,nsLabelKey2");
InvalidConfigurationException e = assertThrows(InvalidConfigurationException.class, () -> ClusterOperatorConfig.fromMap(envVars, KafkaVersionTestUtils.getKafkaVersionLookup()));
assertThat(e.getMessage(), containsString("Failed to parse labels from STRIMZI_CUSTOM_RESOURCE_SELECTOR"));
}
use of io.strimzi.operator.common.InvalidConfigurationException in project strimzi by strimzi.
the class ClusterOperatorConfigTest method testInvalidOperatorNamespaceLabels.
@Test
public void testInvalidOperatorNamespaceLabels() {
Map<String, String> envVars = new HashMap<>(ClusterOperatorConfigTest.ENV_VARS);
envVars.put(ClusterOperatorConfig.STRIMZI_OPERATOR_NAMESPACE_LABELS, "nsLabelKey1,nsLabelKey2");
InvalidConfigurationException e = assertThrows(InvalidConfigurationException.class, () -> ClusterOperatorConfig.fromMap(envVars, KafkaVersionTestUtils.getKafkaVersionLookup()));
assertThat(e.getMessage(), containsString("Failed to parse labels from STRIMZI_OPERATOR_NAMESPACE_LABELS"));
}
use of io.strimzi.operator.common.InvalidConfigurationException in project strimzi by strimzi.
the class ClusterOperatorConfigTest method testInvalidFeatureGate.
@Test
public void testInvalidFeatureGate() {
Map<String, String> envVars = new HashMap<>(ClusterOperatorConfigTest.ENV_VARS);
envVars.put(ClusterOperatorConfig.STRIMZI_FEATURE_GATES, "-NonExistingGate");
InvalidConfigurationException e = assertThrows(InvalidConfigurationException.class, () -> ClusterOperatorConfig.fromMap(envVars, KafkaVersionTestUtils.getKafkaVersionLookup()));
assertThat(e.getMessage(), containsString("Unknown feature gate NonExistingGate found in the configuration"));
}
Aggregations