mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 04:56:53 +00:00
Add validation annotations to DynamicExperimentEnrollmentConfiguration
This commit is contained in:
1 parent
9ec4f0b2f5
commit
f6d1e566e7
2 files changed
+24
-6
No files matched your search
+16
@@ -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