mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 14:58:06 +01:00
Add validation annotations to DynamicExperimentEnrollmentConfiguration
This commit is contained in:
committed by
Jon Chambers
parent
9ec4f0b2f5
commit
f6d1e566e7
@@ -44,6 +44,22 @@ class DynamicConfigurationTest {
|
||||
assertFalse(emptyConfig.getExperimentEnrollmentConfiguration("test").isPresent());
|
||||
}
|
||||
|
||||
{
|
||||
final String invalid = REQUIRED_CONFIG.concat("""
|
||||
experiments:
|
||||
percentageOnly:
|
||||
enrollmentPercentage: 12
|
||||
uuidsAndPercentage:
|
||||
uuidSelector:
|
||||
# the below results in uuids = null
|
||||
uuids:
|
||||
""");
|
||||
final Optional<DynamicConfiguration> maybeConfig =
|
||||
DynamicConfigurationManager.parseConfiguration(invalid, DynamicConfiguration.class);
|
||||
|
||||
assertFalse(maybeConfig.isPresent());
|
||||
}
|
||||
|
||||
{
|
||||
final String experimentConfigYaml = REQUIRED_CONFIG.concat("""
|
||||
experiments:
|
||||
|
||||
Reference in New Issue
Block a user