From a098edad859459ab116d4587af8262877f2b522a Mon Sep 17 00:00:00 2001 From: talio Date: Wed, 17 Jun 2020 15:57:06 +0300 Subject: 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 Change-Id: If386651cab8304ebaf13497ded3a7a50bd60e477 Signed-off-by: talio --- .../sdc/be/dao/cassandra/HealingPipelineDaoTest.java | 12 ++++++++++++ .../sdc/be/resources/data/togglz/FeatureToggleEventTest.java | 7 ++++--- 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'catalog-dao/src/test/java') 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"; -- cgit 1.2.3-korg