mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
docs: Verify/review config descriptions (#1960)
- Reviewed and modified descriptions. - Added some minor formatting. - Removed the "Key:" before every key name, seems redundant.
This commit is contained in:
@@ -173,10 +173,11 @@ TEST(ConfigDescription, GetValues)
|
||||
|
||||
EXPECT_EQ(
|
||||
definition.get("database.type"),
|
||||
"Type of database to use. We currently support Cassandra and Scylladb. We default to Scylladb."
|
||||
"Specifies the type of database used for storing and retrieving data required by the Clio server. Both "
|
||||
"ScyllaDB and Cassandra can serve as backends for Clio; however, this value must be set to `cassandra`."
|
||||
);
|
||||
EXPECT_EQ(definition.get("etl_sources.[].ip"), "IP address of the ETL source.");
|
||||
EXPECT_EQ(definition.get("prometheus.enabled"), "Enable or disable Prometheus metrics.");
|
||||
EXPECT_EQ(definition.get("etl_sources.[].ip"), "The IP address of the ETL source.");
|
||||
EXPECT_EQ(definition.get("prometheus.enabled"), "Enables or disables Prometheus metrics.");
|
||||
}
|
||||
|
||||
struct ConfigDescriptionAssertTest : common::util::WithMockAssert {};
|
||||
|
||||
@@ -236,7 +236,7 @@ TEST_F(ConstraintTest, SetValuesOnNumberConstraint)
|
||||
auto positiveNum = ConfigValue{ConfigType::Integer}.defaultValue(20u).withConstraint(gValidateUint16);
|
||||
auto const err = positiveNum.setValue(-22, "key");
|
||||
EXPECT_TRUE(err.has_value());
|
||||
EXPECT_EQ(err->error, fmt::format("key Number must be between {} and {}", 0, 65535));
|
||||
EXPECT_EQ(err->error, fmt::format("key Number must be between {} and {}", 1, 65535));
|
||||
EXPECT_FALSE(positiveNum.setValue(99, "key"));
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
ConstraintTestBundle{"ipConstraint", gValidateIp},
|
||||
ConstraintTestBundle{"channelConstraint", gValidateChannelName},
|
||||
ConstraintTestBundle{"logLevelConstraint", gValidateLogLevelName},
|
||||
ConstraintTestBundle{"cannsandraNameCnstraint", gValidateCassandraName},
|
||||
ConstraintTestBundle{"cassandraNameConstraint", gValidateCassandraName},
|
||||
ConstraintTestBundle{"loadModeConstraint", gValidateLoadMode},
|
||||
ConstraintTestBundle{"ChannelNameConstraint", gValidateChannelName},
|
||||
ConstraintTestBundle{"ApiVersionConstraint", gValidateApiVersion},
|
||||
|
||||
Reference in New Issue
Block a user