aboutsummaryrefslogtreecommitdiffstats
path: root/utils/provider/src/test
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2017-09-21 16:07:02 -0400
committerDan Timoney <dtimoney@att.com>2017-09-21 16:23:44 -0400
commit37d6468cc670045ab4ff1ee23315739a429aa5e3 (patch)
tree5bfc27601f810a69d2c9442c02b2e6c5f7b392a0 /utils/provider/src/test
parentb98b8dd82639f1a9c0494896f8fc689a5196c523 (diff)
Install sdnc-core utils as karaf package
New utils jar was added in another change, but wasn't bundled as a karaf feature and was not being installed in container. This broke odlsli docker container. This change wraps that util package as a new feature (sdnc-core-utils). Change-Id: Ie8c1d608e2c67aa1635837bc400cec942761c81c Issue-ID: CCSDK-54 Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'utils/provider/src/test')
-rw-r--r--utils/provider/src/test/java/org/onap/ccsdk/sli/core/utils/JREFileResolverTest.java15
-rw-r--r--utils/provider/src/test/java/org/onap/ccsdk/sli/core/utils/KarafRootFileResolverTest.java14
-rw-r--r--utils/provider/src/test/java/org/onap/ccsdk/sli/core/utils/dblib/DblibDefaultFileResolverTest.java25
-rw-r--r--utils/provider/src/test/java/org/onap/ccsdk/sli/core/utils/dblib/DblibEnvVarFileResolverTest.java24
4 files changed, 78 insertions, 0 deletions
diff --git a/utils/provider/src/test/java/org/onap/ccsdk/sli/core/utils/JREFileResolverTest.java b/utils/provider/src/test/java/org/onap/ccsdk/sli/core/utils/JREFileResolverTest.java
new file mode 100644
index 00000000..e5051d65
--- /dev/null
+++ b/utils/provider/src/test/java/org/onap/ccsdk/sli/core/utils/JREFileResolverTest.java
@@ -0,0 +1,15 @@
+package org.onap.ccsdk.sli.core.utils;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class JREFileResolverTest {
+
+ @Test
+ public void getSuccessfulResolutionMessage() throws Exception {
+ final PropertiesFileResolver resolver = new JREFileResolver("success", JREFileResolverTest.class);
+ assertEquals("success", resolver.getSuccessfulResolutionMessage());
+ }
+
+} \ No newline at end of file
diff --git a/utils/provider/src/test/java/org/onap/ccsdk/sli/core/utils/KarafRootFileResolverTest.java b/utils/provider/src/test/java/org/onap/ccsdk/sli/core/utils/KarafRootFileResolverTest.java
new file mode 100644
index 00000000..5e407daf
--- /dev/null
+++ b/utils/provider/src/test/java/org/onap/ccsdk/sli/core/utils/KarafRootFileResolverTest.java
@@ -0,0 +1,14 @@
+package org.onap.ccsdk.sli.core.utils;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class KarafRootFileResolverTest {
+ @Test
+ public void getSuccessfulResolutionMessage() throws Exception {
+ final PropertiesFileResolver resolver = new KarafRootFileResolver("success", null);
+ assertEquals("success", resolver.getSuccessfulResolutionMessage());
+ }
+
+} \ No newline at end of file
diff --git a/utils/provider/src/test/java/org/onap/ccsdk/sli/core/utils/dblib/DblibDefaultFileResolverTest.java b/utils/provider/src/test/java/org/onap/ccsdk/sli/core/utils/dblib/DblibDefaultFileResolverTest.java
new file mode 100644
index 00000000..4b28d449
--- /dev/null
+++ b/utils/provider/src/test/java/org/onap/ccsdk/sli/core/utils/dblib/DblibDefaultFileResolverTest.java
@@ -0,0 +1,25 @@
+package org.onap.ccsdk.sli.core.utils.dblib;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.util.Optional;
+import org.junit.Test;
+import org.onap.ccsdk.sli.core.utils.PropertiesFileResolver;
+
+public class DblibDefaultFileResolverTest {
+
+ @Test
+ public void resolveFile() throws Exception {
+ final PropertiesFileResolver resolver = new DblibDefaultFileResolver("success");
+ final Optional<File> file = resolver.resolveFile("doesnotexist.cfg");
+ assertFalse(file.isPresent());
+ }
+
+ @Test
+ public void getSuccessfulResolutionMessage() throws Exception {
+ final PropertiesFileResolver resolver = new DblibDefaultFileResolver("success");
+ assertEquals("success", resolver.getSuccessfulResolutionMessage());
+ }
+
+} \ No newline at end of file
diff --git a/utils/provider/src/test/java/org/onap/ccsdk/sli/core/utils/dblib/DblibEnvVarFileResolverTest.java b/utils/provider/src/test/java/org/onap/ccsdk/sli/core/utils/dblib/DblibEnvVarFileResolverTest.java
new file mode 100644
index 00000000..bae4168d
--- /dev/null
+++ b/utils/provider/src/test/java/org/onap/ccsdk/sli/core/utils/dblib/DblibEnvVarFileResolverTest.java
@@ -0,0 +1,24 @@
+package org.onap.ccsdk.sli.core.utils.dblib;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.util.Optional;
+import org.junit.Test;
+import org.onap.ccsdk.sli.core.utils.PropertiesFileResolver;
+
+public class DblibEnvVarFileResolverTest {
+ @Test
+ public void resolveFile() throws Exception {
+ final PropertiesFileResolver resolver = new DblibEnvVarFileResolver("success");
+ final Optional<File> file = resolver.resolveFile("doesnotexist.cfg");
+ assertFalse(file.isPresent());
+ }
+
+ @Test
+ public void getSuccessfulResolutionMessage() throws Exception {
+ final PropertiesFileResolver resolver = new DblibEnvVarFileResolver("success");
+ assertEquals("success", resolver.getSuccessfulResolutionMessage());
+ }
+
+} \ No newline at end of file