Exemple #1
0
def test_topic_creation_with_malformed_value_fails(valid_config):
    valid_config["config"]["segment.ms"] = "foo_bar_baz"
    with pytest.raises(ValidationException):
        validate_topic_config(valid_config)
Exemple #2
0
def test_config_without_required_keys_fails(valid_config):
    del valid_config["num_partitions"]
    with pytest.raises(ValidationException):
        validate_topic_config(valid_config)
Exemple #3
0
def test_config_with_unknown_key_fails(valid_config):
    valid_config["config"]["foo.bar.baz"] = "true"
    with pytest.raises(ValidationException):
        validate_topic_config(valid_config)
Exemple #4
0
def test_config_with_valid_keys_works(valid_config):
    validate_topic_config(valid_config)