summaryrefslogtreecommitdiffstats
path: root/catalog-dao/src/test/java
diff options
context:
space:
mode:
authortalio <talio@amdocs.com>2020-06-17 15:57:06 +0300
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-06-21 07:13:29 +0000
commita098edad859459ab116d4587af8262877f2b522a (patch)
treed5ac83bf0ef79e0d0b7de4c28ba2953acf238b9d /catalog-dao/src/test/java
parentb0140364e491df1009cf00e50c0207d2e9ca3453 (diff)
Toggle
Add toggling mechanism to catalog side. The first toggleable feature is healing - this was added to healing flow, in healJanusGraphDao Issue-ID: SDC-2874 Signed-off-by: talio <talio@amdocs.com> Change-Id: If386651cab8304ebaf13497ded3a7a50bd60e477 Signed-off-by: talio <talio@amdocs.com>
Diffstat (limited to 'catalog-dao/src/test/java')
-rw-r--r--catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/HealingPipelineDaoTest.java12
-rw-r--r--catalog-dao/src/test/java/org/openecomp/sdc/be/resources/data/togglz/FeatureToggleEventTest.java7
2 files changed, 16 insertions, 3 deletions
diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/HealingPipelineDaoTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/HealingPipelineDaoTest.java
index c0d9e4644c..f079ddd186 100644
--- a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/HealingPipelineDaoTest.java
+++ b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/HealingPipelineDaoTest.java
@@ -22,6 +22,8 @@ import org.janusgraph.graphdb.relations.StandardVertexProperty;
import org.janusgraph.graphdb.types.system.EmptyVertex;
import org.janusgraph.graphdb.types.system.ImplicitKey;
import java.util.HashMap;
+import org.junit.Before;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.mockito.Mockito;
import org.openecomp.sdc.be.dao.graph.datatype.GraphEdge;
@@ -36,11 +38,21 @@ import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
import java.util.Map;
import java.util.Optional;
+import org.openecomp.sdc.be.togglz.ToggleableFeature;
+import org.togglz.testing.TestFeatureManager;
+import org.togglz.testing.TestFeatureManagerProvider;
import static org.junit.Assert.*;
public class HealingPipelineDaoTest {
+ @Before
+ public void enableToggleableFeatures(){
+ TestFeatureManager manager = new TestFeatureManager(ToggleableFeature.class);
+ manager.enableAll();
+ TestFeatureManagerProvider.setFeatureManager(manager);
+ }
+
@Test
public void shouldUpgrade() {
diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/resources/data/togglz/FeatureToggleEventTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/resources/data/togglz/FeatureToggleEventTest.java
index 53bf27d9f9..9675e3a734 100644
--- a/catalog-dao/src/test/java/org/openecomp/sdc/be/resources/data/togglz/FeatureToggleEventTest.java
+++ b/catalog-dao/src/test/java/org/openecomp/sdc/be/resources/data/togglz/FeatureToggleEventTest.java
@@ -20,15 +20,16 @@
package org.openecomp.sdc.be.resources.data.togglz;
-import org.junit.Test;
-import org.togglz.core.repository.FeatureState;
-
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.isEmptyOrNullString;
import static org.hamcrest.Matchers.isEmptyString;
import static org.hamcrest.Matchers.nullValue;
import static org.junit.Assert.assertThat;
+import org.junit.Test;
+import org.openecomp.sdc.be.togglz.ToggleableFeature;
+import org.togglz.core.repository.FeatureState;
+
public class FeatureToggleEventTest {
private final String strategyId = "123456";
private final String param1 = "param1";