summaryrefslogtreecommitdiffstats
path: root/config-model-api
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2021-06-08 12:57:27 +0200
committerJon Bratseth <bratseth@gmail.com>2021-06-08 12:57:27 +0200
commit96315f81e64527ff37c446e904e3955c590e4fb8 (patch)
treec6cf52ed5c441a374e14899a53ecab03e2830f29 /config-model-api
parent9a4f642aa090cff6b72705be455567105b7b1e8f (diff)
Mostly remove old way of overriding validations in dev
Diffstat (limited to 'config-model-api')
-rw-r--r--config-model-api/src/main/java/com/yahoo/config/application/api/ValidationOverrides.java1
-rw-r--r--config-model-api/src/test/java/com/yahoo/config/application/api/ValidationOverrideTest.java15
2 files changed, 1 insertions, 15 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/application/api/ValidationOverrides.java b/config-model-api/src/main/java/com/yahoo/config/application/api/ValidationOverrides.java
index ea27b7f70d8..3221df38d4f 100644
--- a/config-model-api/src/main/java/com/yahoo/config/application/api/ValidationOverrides.java
+++ b/config-model-api/src/main/java/com/yahoo/config/application/api/ValidationOverrides.java
@@ -177,6 +177,7 @@ public class ValidationOverrides {
}
+ // TODO: Remove this class after June 2021
public static class AllowAllValidationOverrides extends ValidationOverrides {
private final DeployLogger logger;
diff --git a/config-model-api/src/test/java/com/yahoo/config/application/api/ValidationOverrideTest.java b/config-model-api/src/test/java/com/yahoo/config/application/api/ValidationOverrideTest.java
index 2943b0bab34..f7ef059c5f2 100644
--- a/config-model-api/src/test/java/com/yahoo/config/application/api/ValidationOverrideTest.java
+++ b/config-model-api/src/test/java/com/yahoo/config/application/api/ValidationOverrideTest.java
@@ -4,16 +4,10 @@ package com.yahoo.config.application.api;
import com.yahoo.test.ManualClock;
import org.junit.Assert;
import org.junit.Test;
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
import java.io.StringReader;
-import java.time.Clock;
import java.time.Instant;
-import java.util.Optional;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
/**
* @author bratseth
@@ -82,15 +76,6 @@ public class ValidationOverrideTest {
assertEquals(empty.xmlForm(), emptyReserialized.xmlForm());
}
- @Test
- public void testAll() {
- ValidationOverrides all = ValidationOverrides.all;
- assertTrue(all.allows(ValidationId.deploymentRemoval, Clock.systemUTC().instant()));
- assertTrue(all.allows(ValidationId.contentClusterRemoval, Clock.systemUTC().instant()));
- assertTrue(all.allows(ValidationId.indexModeChange, Clock.systemUTC().instant()));
- assertTrue(all.allows(ValidationId.fieldTypeChange, Clock.systemUTC().instant()));
- }
-
private void assertOverridden(String validationId, ValidationOverrides overrides, Instant now) {
overrides.invalid(ValidationId.from(validationId).get(), "message", now); // should not throw exception
}