use of io.strimzi.operator.common.InvalidConfigurationException in project strimzi by strimzi.
the class FeatureGatesTest method testDuplicateFeatureGateWithDifferentValue.
@ParallelTest
public void testDuplicateFeatureGateWithDifferentValue() {
InvalidConfigurationException e = assertThrows(InvalidConfigurationException.class, () -> new FeatureGates("+ControlPlaneListener,-ControlPlaneListener"));
assertThat(e.getMessage(), containsString("Feature gate ControlPlaneListener is configured multiple times"));
}
use of io.strimzi.operator.common.InvalidConfigurationException in project strimzi-kafka-operator 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-kafka-operator 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"));
}
use of io.strimzi.operator.common.InvalidConfigurationException in project strimzi-kafka-operator 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-kafka-operator by strimzi.
the class FeatureGatesTest method testDuplicateFeatureGateWithDifferentValue.
@ParallelTest
public void testDuplicateFeatureGateWithDifferentValue() {
InvalidConfigurationException e = assertThrows(InvalidConfigurationException.class, () -> new FeatureGates("+ControlPlaneListener,-ControlPlaneListener"));
assertThat(e.getMessage(), containsString("Feature gate ControlPlaneListener is configured multiple times"));
}
Aggregations