diff options
author | Agarwal, Ruchira (ra1926) <ra1926@att.com> | 2019-07-22 20:26:50 +0000 |
---|---|---|
committer | Agarwal, Ruchira (ra1926) <ra1926@att.com> | 2019-07-23 14:55:23 +0000 |
commit | 57bfbb05e485fb11b620b1bf12e70aa063aaa3c8 (patch) | |
tree | 434a13e13cf45004a91f309e86c76038cf1d27af /properties-node/provider/src/test/java | |
parent | 1201ff98e4c7856b03b268302e4aed2cdc6e1dbb (diff) |
configurable param resolution
support config parameter resolution to k8s secret value
Issue-ID: CCSDK-1502
Signed-off-by: Agarwal, Ruchira (ra1926) <ra1926@att.com>
Change-Id: I8acc98fa3fdd9ba46c617b4d0113086c1e889997
Diffstat (limited to 'properties-node/provider/src/test/java')
-rw-r--r-- | properties-node/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/prop/TestPropertiesNode.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/properties-node/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/prop/TestPropertiesNode.java b/properties-node/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/prop/TestPropertiesNode.java index f1e0ab62..a858c49b 100644 --- a/properties-node/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/prop/TestPropertiesNode.java +++ b/properties-node/provider/src/test/java/jtest/org/onap/ccsdk/sli/plugins/prop/TestPropertiesNode.java @@ -5,7 +5,9 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; +import org.junit.Rule; import org.junit.Test; +import org.junit.contrib.java.lang.system.EnvironmentVariables; import static org.junit.Assert.assertEquals; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; import org.onap.ccsdk.sli.core.sli.SvcLogicException; @@ -16,6 +18,8 @@ import org.slf4j.LoggerFactory; public class TestPropertiesNode { private static final Logger log = LoggerFactory.getLogger(TestPropertiesNode.class); + @Rule + public EnvironmentVariables environmentVariables = new EnvironmentVariables(); @Test public void testJSONFileParsing() throws SvcLogicException { @@ -129,6 +133,10 @@ public class TestPropertiesNode { @Test public void testTXTFileParsing() throws SvcLogicException { + + environmentVariables.set("deployer_pass", "sdncp-123"); + assertEquals("sdncp-123", System.getenv("deployer_pass")); + SvcLogicContext ctx = new SvcLogicContext(); Map<String, String> p = new HashMap<String, String>(); @@ -147,6 +155,7 @@ public class TestPropertiesNode { "access-information.l1-customer-handoff"),"_1000BASELX"); assertEquals(ctx.getAttribute("test-txt.service-data.avpn-ip-port-information.avpn-" + "access-information.vlan-tag-control"),"_1Q"); + assertEquals(ctx.getAttribute("test-txt.obfuscated-var"), "sdncp-123"); } @Test |