mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 04:58:06 +01:00
Allow remote config to send non-boolean values
This version of remote config allows non-boolean values to be returned to clients but unfortunately limits the configuration to only one value or another. There is no way to configure more than two values for the same key with this setup.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package org.whispersystems.textsecuregcm.tests.controllers;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import io.dropwizard.auth.PolymorphicAuthValueFactoryProvider;
|
||||
import io.dropwizard.testing.junit.ResourceTestRule;
|
||||
import org.glassfish.jersey.test.grizzly.GrizzlyWebTestContainerFactory;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
@@ -20,26 +22,25 @@ import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import io.dropwizard.auth.PolymorphicAuthValueFactoryProvider;
|
||||
import io.dropwizard.testing.junit.ResourceTestRule;
|
||||
import static org.assertj.core.api.Java6Assertions.assertThat;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.verifyNoMoreInteractions;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
public class RemoteConfigControllerTest {
|
||||
|
||||
private RemoteConfigsManager remoteConfigsManager = mock(RemoteConfigsManager.class);
|
||||
private List<String> remoteConfigsAuth = new LinkedList<>() {{
|
||||
add("foo");
|
||||
add("bar");
|
||||
}};
|
||||
private final RemoteConfigsManager remoteConfigsManager = mock(RemoteConfigsManager.class);
|
||||
private final List<String> remoteConfigsAuth = List.of("foo", "bar");
|
||||
|
||||
@Rule
|
||||
public final ResourceTestRule resources = ResourceTestRule.builder()
|
||||
@@ -52,24 +53,15 @@ public class RemoteConfigControllerTest {
|
||||
|
||||
|
||||
@Before
|
||||
public void setup() throws Exception {
|
||||
public void setup() {
|
||||
when(remoteConfigsManager.getAll()).thenReturn(new LinkedList<>() {{
|
||||
add(new RemoteConfig("android.stickers", 25, new HashSet<>() {{
|
||||
add(AuthHelper.DISABLED_UUID);
|
||||
add(AuthHelper.INVALID_UUID);
|
||||
}}));
|
||||
|
||||
add(new RemoteConfig("ios.stickers", 50, new HashSet<>() {{
|
||||
|
||||
}}));
|
||||
|
||||
add(new RemoteConfig("always.true", 100, new HashSet<>() {{
|
||||
|
||||
}}));
|
||||
|
||||
add(new RemoteConfig("only.special", 0, new HashSet<>() {{
|
||||
add(AuthHelper.VALID_UUID);
|
||||
}}));
|
||||
add(new RemoteConfig("android.stickers", 25, Set.of(AuthHelper.DISABLED_UUID, AuthHelper.INVALID_UUID), null, null));
|
||||
add(new RemoteConfig("ios.stickers", 50, Set.of(), null, null));
|
||||
add(new RemoteConfig("always.true", 100, Set.of(), null, null));
|
||||
add(new RemoteConfig("only.special", 0, Set.of(AuthHelper.VALID_UUID), null, null));
|
||||
add(new RemoteConfig("value.always.true", 100, Set.of(), "foo", "bar"));
|
||||
add(new RemoteConfig("value.only.special", 0, Set.of(AuthHelper.VALID_UUID), "abc", "xyz"));
|
||||
add(new RemoteConfig("value.always.false", 0, Set.of(), "red", "green"));
|
||||
}});
|
||||
}
|
||||
|
||||
@@ -83,12 +75,24 @@ public class RemoteConfigControllerTest {
|
||||
|
||||
verify(remoteConfigsManager, times(1)).getAll();
|
||||
|
||||
assertThat(configuration.getConfig().size()).isEqualTo(4);
|
||||
assertThat(configuration.getConfig().size()).isEqualTo(7);
|
||||
assertThat(configuration.getConfig().get(0).getName()).isEqualTo("android.stickers");
|
||||
assertThat(configuration.getConfig().get(1).getName()).isEqualTo("ios.stickers");
|
||||
assertThat(configuration.getConfig().get(2).getName()).isEqualTo("always.true");
|
||||
assertThat(configuration.getConfig().get(2).isEnabled()).isEqualTo(true);
|
||||
assertThat(configuration.getConfig().get(2).getValue()).isNull();
|
||||
assertThat(configuration.getConfig().get(3).getName()).isEqualTo("only.special");
|
||||
assertThat(configuration.getConfig().get(3).isEnabled()).isEqualTo(true);
|
||||
assertThat(configuration.getConfig().get(2).getValue()).isNull();
|
||||
assertThat(configuration.getConfig().get(4).getName()).isEqualTo("value.always.true");
|
||||
assertThat(configuration.getConfig().get(4).isEnabled()).isEqualTo(true);
|
||||
assertThat(configuration.getConfig().get(4).getValue()).isEqualTo("bar");
|
||||
assertThat(configuration.getConfig().get(5).getName()).isEqualTo("value.only.special");
|
||||
assertThat(configuration.getConfig().get(5).isEnabled()).isEqualTo(true);
|
||||
assertThat(configuration.getConfig().get(5).getValue()).isEqualTo("xyz");
|
||||
assertThat(configuration.getConfig().get(6).getName()).isEqualTo("value.always.false");
|
||||
assertThat(configuration.getConfig().get(6).isEnabled()).isEqualTo(false);
|
||||
assertThat(configuration.getConfig().get(6).getValue()).isEqualTo("red");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -101,12 +105,24 @@ public class RemoteConfigControllerTest {
|
||||
|
||||
verify(remoteConfigsManager, times(1)).getAll();
|
||||
|
||||
assertThat(configuration.getConfig().size()).isEqualTo(4);
|
||||
assertThat(configuration.getConfig().size()).isEqualTo(7);
|
||||
assertThat(configuration.getConfig().get(0).getName()).isEqualTo("android.stickers");
|
||||
assertThat(configuration.getConfig().get(1).getName()).isEqualTo("ios.stickers");
|
||||
assertThat(configuration.getConfig().get(2).getName()).isEqualTo("always.true");
|
||||
assertThat(configuration.getConfig().get(2).isEnabled()).isEqualTo(true);
|
||||
assertThat(configuration.getConfig().get(2).getValue()).isNull();
|
||||
assertThat(configuration.getConfig().get(3).getName()).isEqualTo("only.special");
|
||||
assertThat(configuration.getConfig().get(3).isEnabled()).isEqualTo(false);
|
||||
assertThat(configuration.getConfig().get(2).getValue()).isNull();
|
||||
assertThat(configuration.getConfig().get(4).getName()).isEqualTo("value.always.true");
|
||||
assertThat(configuration.getConfig().get(4).isEnabled()).isEqualTo(true);
|
||||
assertThat(configuration.getConfig().get(4).getValue()).isEqualTo("bar");
|
||||
assertThat(configuration.getConfig().get(5).getName()).isEqualTo("value.only.special");
|
||||
assertThat(configuration.getConfig().get(5).isEnabled()).isEqualTo(false);
|
||||
assertThat(configuration.getConfig().get(5).getValue()).isEqualTo("abc");
|
||||
assertThat(configuration.getConfig().get(6).getName()).isEqualTo("value.always.false");
|
||||
assertThat(configuration.getConfig().get(6).isEnabled()).isEqualTo(false);
|
||||
assertThat(configuration.getConfig().get(6).getValue()).isEqualTo("red");
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +146,7 @@ public class RemoteConfigControllerTest {
|
||||
.target("/v1/config")
|
||||
.request()
|
||||
.header("Config-Token", "foo")
|
||||
.put(Entity.entity(new RemoteConfig("android.stickers", 88, new HashSet<>()), MediaType.APPLICATION_JSON_TYPE));
|
||||
.put(Entity.entity(new RemoteConfig("android.stickers", 88, Set.of(), "FALSE", "TRUE"), MediaType.APPLICATION_JSON_TYPE));
|
||||
|
||||
assertThat(response.getStatus()).isEqualTo(204);
|
||||
|
||||
@@ -143,13 +159,32 @@ public class RemoteConfigControllerTest {
|
||||
assertThat(captor.getValue().getUuids()).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetConfigValued() {
|
||||
Response response = resources.getJerseyTest()
|
||||
.target("/v1/config")
|
||||
.request()
|
||||
.header("Config-Token", "foo")
|
||||
.put(Entity.entity(new RemoteConfig("value.sometimes", 50, Set.of(), "a", "b"), MediaType.APPLICATION_JSON_TYPE));
|
||||
|
||||
assertThat(response.getStatus()).isEqualTo(204);
|
||||
|
||||
ArgumentCaptor<RemoteConfig> captor = ArgumentCaptor.forClass(RemoteConfig.class);
|
||||
|
||||
verify(remoteConfigsManager, times(1)).set(captor.capture());
|
||||
|
||||
assertThat(captor.getValue().getName()).isEqualTo("value.sometimes");
|
||||
assertThat(captor.getValue().getPercentage()).isEqualTo(50);
|
||||
assertThat(captor.getValue().getUuids()).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetConfigUnauthorized() {
|
||||
Response response = resources.getJerseyTest()
|
||||
.target("/v1/config")
|
||||
.request()
|
||||
.header("Config-Token", "baz")
|
||||
.put(Entity.entity(new RemoteConfig("android.stickers", 88, new HashSet<>()), MediaType.APPLICATION_JSON_TYPE));
|
||||
.put(Entity.entity(new RemoteConfig("android.stickers", 88, Set.of(), "FALSE", "TRUE"), MediaType.APPLICATION_JSON_TYPE));
|
||||
|
||||
assertThat(response.getStatus()).isEqualTo(401);
|
||||
|
||||
@@ -161,7 +196,7 @@ public class RemoteConfigControllerTest {
|
||||
Response response = resources.getJerseyTest()
|
||||
.target("/v1/config")
|
||||
.request()
|
||||
.put(Entity.entity(new RemoteConfig("android.stickers", 88, new HashSet<>()), MediaType.APPLICATION_JSON_TYPE));
|
||||
.put(Entity.entity(new RemoteConfig("android.stickers", 88, Set.of(), "FALSE", "TRUE"), MediaType.APPLICATION_JSON_TYPE));
|
||||
|
||||
assertThat(response.getStatus()).isEqualTo(401);
|
||||
|
||||
@@ -174,7 +209,7 @@ public class RemoteConfigControllerTest {
|
||||
.target("/v1/config")
|
||||
.request()
|
||||
.header("Config-Token", "foo")
|
||||
.put(Entity.entity(new RemoteConfig("android-stickers", 88, new HashSet<>()), MediaType.APPLICATION_JSON_TYPE));
|
||||
.put(Entity.entity(new RemoteConfig("android-stickers", 88, Set.of(), "FALSE", "TRUE"), MediaType.APPLICATION_JSON_TYPE));
|
||||
|
||||
assertThat(response.getStatus()).isEqualTo(422);
|
||||
|
||||
@@ -187,7 +222,7 @@ public class RemoteConfigControllerTest {
|
||||
.target("/v1/config")
|
||||
.request()
|
||||
.header("Config-Token", "foo")
|
||||
.put(Entity.entity(new RemoteConfig("", 88, new HashSet<>()), MediaType.APPLICATION_JSON_TYPE));
|
||||
.put(Entity.entity(new RemoteConfig("", 88, Set.of(), "FALSE", "TRUE"), MediaType.APPLICATION_JSON_TYPE));
|
||||
|
||||
assertThat(response.getStatus()).isEqualTo(422);
|
||||
|
||||
@@ -232,7 +267,6 @@ public class RemoteConfigControllerTest {
|
||||
for (int i=0;i<iterations;i++) {
|
||||
for (RemoteConfig config : remoteConfigList) {
|
||||
int count = enabledMap.getOrDefault(config.getName(), 0);
|
||||
int random = new SecureRandom().nextInt(iterations);
|
||||
|
||||
if (RemoteConfigController.isInBucket(digest, UUID.randomUUID(), config.getName().getBytes(), config.getPercentage(), new HashSet<>())) {
|
||||
count++;
|
||||
|
||||
@@ -14,11 +14,10 @@ import org.whispersystems.textsecuregcm.storage.RemoteConfigs;
|
||||
import org.whispersystems.textsecuregcm.storage.RemoteConfigsManager;
|
||||
import org.whispersystems.textsecuregcm.tests.util.AuthHelper;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import io.dropwizard.auth.Auth;
|
||||
import static org.assertj.core.api.Java6Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class RemoteConfigsManagerTest {
|
||||
|
||||
@@ -36,17 +35,18 @@ public class RemoteConfigsManagerTest {
|
||||
|
||||
@Test
|
||||
public void testUpdate() throws InterruptedException {
|
||||
remoteConfigs.set(new RemoteConfig("android.stickers", 50, new HashSet<>() {{
|
||||
add(AuthHelper.VALID_UUID);
|
||||
}}));
|
||||
remoteConfigs.set(new RemoteConfig("ios.stickers", 50, new HashSet<>()));
|
||||
remoteConfigs.set(new RemoteConfig("ios.stickers", 75, new HashSet<>()));
|
||||
remoteConfigs.set(new RemoteConfig("android.stickers", 50, Set.of(AuthHelper.VALID_UUID), "FALSE", "TRUE"));
|
||||
remoteConfigs.set(new RemoteConfig("value.sometimes", 50, Set.of(), "bar", "baz"));
|
||||
remoteConfigs.set(new RemoteConfig("ios.stickers", 50, Set.of(), "FALSE", "TRUE"));
|
||||
remoteConfigs.set(new RemoteConfig("ios.stickers", 75, Set.of(), "FALSE", "TRUE"));
|
||||
remoteConfigs.set(new RemoteConfig("value.sometimes", 25, Set.of(AuthHelper.VALID_UUID), "abc", "def"));
|
||||
|
||||
Thread.sleep(501);
|
||||
|
||||
List<RemoteConfig> results = remoteConfigs.getAll();
|
||||
|
||||
assertThat(results.size()).isEqualTo(2);
|
||||
assertThat(results.size()).isEqualTo(3);
|
||||
|
||||
assertThat(results.get(0).getName()).isEqualTo("android.stickers");
|
||||
assertThat(results.get(0).getPercentage()).isEqualTo(50);
|
||||
assertThat(results.get(0).getUuids().size()).isEqualTo(1);
|
||||
@@ -56,6 +56,13 @@ public class RemoteConfigsManagerTest {
|
||||
assertThat(results.get(1).getPercentage()).isEqualTo(75);
|
||||
assertThat(results.get(1).getUuids()).isEmpty();
|
||||
|
||||
assertThat(results.get(2).getName()).isEqualTo("value.sometimes");
|
||||
assertThat(results.get(2).getUuids()).hasSize(1);
|
||||
assertThat(results.get(2).getUuids()).contains(AuthHelper.VALID_UUID);
|
||||
assertThat(results.get(2).getPercentage()).isEqualTo(25);
|
||||
assertThat(results.get(2).getDefaultValue()).isEqualTo("abc");
|
||||
assertThat(results.get(2).getValue()).isEqualTo("def");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,12 +13,10 @@ import org.whispersystems.textsecuregcm.storage.RemoteConfig;
|
||||
import org.whispersystems.textsecuregcm.storage.RemoteConfigs;
|
||||
import org.whispersystems.textsecuregcm.tests.util.AuthHelper;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import io.dropwizard.auth.Auth;
|
||||
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class RemoteConfigsTest {
|
||||
|
||||
@@ -33,60 +31,84 @@ public class RemoteConfigsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStore() throws SQLException {
|
||||
remoteConfigs.set(new RemoteConfig("android.stickers", 50, new HashSet<>() {{
|
||||
add(AuthHelper.VALID_UUID);
|
||||
add(AuthHelper.VALID_UUID_TWO);
|
||||
}}));
|
||||
public void testStore() {
|
||||
remoteConfigs.set(new RemoteConfig("android.stickers", 50, Set.of(AuthHelper.VALID_UUID, AuthHelper.VALID_UUID_TWO), "FALSE", "TRUE"));
|
||||
remoteConfigs.set(new RemoteConfig("value.sometimes", 25, Set.of(AuthHelper.VALID_UUID_TWO), "default", "custom"));
|
||||
|
||||
List<RemoteConfig> configs = remoteConfigs.getAll();
|
||||
|
||||
assertThat(configs.size()).isEqualTo(1);
|
||||
assertThat(configs).hasSize(2);
|
||||
|
||||
assertThat(configs.get(0).getName()).isEqualTo("android.stickers");
|
||||
assertThat(configs.get(0).getValue()).isEqualTo("TRUE");
|
||||
assertThat(configs.get(0).getDefaultValue()).isEqualTo("FALSE");
|
||||
assertThat(configs.get(0).getPercentage()).isEqualTo(50);
|
||||
assertThat(configs.get(0).getUuids().size()).isEqualTo(2);
|
||||
assertThat(configs.get(0).getUuids().contains(AuthHelper.VALID_UUID)).isTrue();
|
||||
assertThat(configs.get(0).getUuids().contains(AuthHelper.VALID_UUID_TWO)).isTrue();
|
||||
assertThat(configs.get(0).getUuids().contains(AuthHelper.INVALID_UUID)).isFalse();
|
||||
assertThat(configs.get(0).getUuids()).hasSize(2);
|
||||
assertThat(configs.get(0).getUuids()).contains(AuthHelper.VALID_UUID);
|
||||
assertThat(configs.get(0).getUuids()).contains(AuthHelper.VALID_UUID_TWO);
|
||||
assertThat(configs.get(0).getUuids()).doesNotContain(AuthHelper.INVALID_UUID);
|
||||
|
||||
assertThat(configs.get(1).getName()).isEqualTo("value.sometimes");
|
||||
assertThat(configs.get(1).getValue()).isEqualTo("custom");
|
||||
assertThat(configs.get(1).getDefaultValue()).isEqualTo("default");
|
||||
assertThat(configs.get(1).getPercentage()).isEqualTo(25);
|
||||
assertThat(configs.get(1).getUuids()).hasSize(1);
|
||||
assertThat(configs.get(1).getUuids()).contains(AuthHelper.VALID_UUID_TWO);
|
||||
assertThat(configs.get(1).getUuids()).doesNotContain(AuthHelper.VALID_UUID);
|
||||
assertThat(configs.get(1).getUuids()).doesNotContain(AuthHelper.INVALID_UUID);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdate() throws SQLException {
|
||||
remoteConfigs.set(new RemoteConfig("android.stickers", 50, new HashSet<>()));
|
||||
|
||||
remoteConfigs.set(new RemoteConfig("ios.stickers", 50, new HashSet<>() {{
|
||||
add(AuthHelper.DISABLED_UUID);
|
||||
}}));
|
||||
|
||||
remoteConfigs.set(new RemoteConfig("ios.stickers", 75, new HashSet<>()));
|
||||
public void testUpdate() {
|
||||
remoteConfigs.set(new RemoteConfig("android.stickers", 50, Set.of(), "FALSE", "TRUE"));
|
||||
remoteConfigs.set(new RemoteConfig("value.sometimes", 22, Set.of(), "def", "!"));
|
||||
remoteConfigs.set(new RemoteConfig("ios.stickers", 50, Set.of(AuthHelper.DISABLED_UUID), "FALSE", "TRUE"));
|
||||
remoteConfigs.set(new RemoteConfig("ios.stickers", 75, Set.of(), "FALSE", "TRUE"));
|
||||
remoteConfigs.set(new RemoteConfig("value.sometimes", 77, Set.of(), "hey", "wut"));
|
||||
|
||||
List<RemoteConfig> configs = remoteConfigs.getAll();
|
||||
|
||||
assertThat(configs.size()).isEqualTo(2);
|
||||
assertThat(configs).hasSize(3);
|
||||
|
||||
assertThat(configs.get(0).getName()).isEqualTo("android.stickers");
|
||||
assertThat(configs.get(0).getPercentage()).isEqualTo(50);
|
||||
assertThat(configs.get(0).getUuids().size()).isEqualTo(0);
|
||||
assertThat(configs.get(0).getUuids()).isEmpty();
|
||||
assertThat(configs.get(0).getDefaultValue()).isEqualTo("FALSE");
|
||||
assertThat(configs.get(0).getValue()).isEqualTo("TRUE");
|
||||
|
||||
assertThat(configs.get(1).getName()).isEqualTo("ios.stickers");
|
||||
assertThat(configs.get(1).getPercentage()).isEqualTo(75);
|
||||
assertThat(configs.get(1).getUuids().size()).isEqualTo(0);
|
||||
assertThat(configs.get(1).getUuids()).isEmpty();
|
||||
assertThat(configs.get(1).getDefaultValue()).isEqualTo("FALSE");
|
||||
assertThat(configs.get(1).getValue()).isEqualTo("TRUE");
|
||||
|
||||
assertThat(configs.get(2).getName()).isEqualTo("value.sometimes");
|
||||
assertThat(configs.get(2).getPercentage()).isEqualTo(77);
|
||||
assertThat(configs.get(2).getUuids()).isEmpty();
|
||||
assertThat(configs.get(2).getDefaultValue()).isEqualTo("hey");
|
||||
assertThat(configs.get(2).getValue()).isEqualTo("wut");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDelete() {
|
||||
remoteConfigs.set(new RemoteConfig("android.stickers", 50, new HashSet<>() {{
|
||||
add(AuthHelper.VALID_UUID);
|
||||
}}));
|
||||
remoteConfigs.set(new RemoteConfig("ios.stickers", 50, new HashSet<>()));
|
||||
remoteConfigs.set(new RemoteConfig("ios.stickers", 75, new HashSet<>()));
|
||||
remoteConfigs.set(new RemoteConfig("android.stickers", 50, Set.of(AuthHelper.VALID_UUID), "FALSE", "TRUE"));
|
||||
remoteConfigs.set(new RemoteConfig("ios.stickers", 50, Set.of(), "FALSE", "TRUE"));
|
||||
remoteConfigs.set(new RemoteConfig("ios.stickers", 75, Set.of(), "FALSE", "TRUE"));
|
||||
remoteConfigs.set(new RemoteConfig("value.always", 100, Set.of(), "never", "always"));
|
||||
remoteConfigs.delete("android.stickers");
|
||||
|
||||
List<RemoteConfig> configs = remoteConfigs.getAll();
|
||||
|
||||
assertThat(configs.size()).isEqualTo(1);
|
||||
assertThat(configs).hasSize(2);
|
||||
|
||||
assertThat(configs.get(0).getName()).isEqualTo("ios.stickers");
|
||||
assertThat(configs.get(0).getPercentage()).isEqualTo(75);
|
||||
assertThat(configs.get(0).getDefaultValue()).isEqualTo("FALSE");
|
||||
assertThat(configs.get(0).getValue()).isEqualTo("TRUE");
|
||||
|
||||
assertThat(configs.get(1).getName()).isEqualTo("value.always");
|
||||
assertThat(configs.get(1).getPercentage()).isEqualTo(100);
|
||||
assertThat(configs.get(1).getValue()).isEqualTo("always");
|
||||
assertThat(configs.get(1).getDefaultValue()).isEqualTo("never");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user