diff options
Diffstat (limited to 'src/test/java')
5 files changed, 8 insertions, 10 deletions
diff --git a/src/test/java/org/onap/music/unittests/MusicDataStoreTest.java b/src/test/java/org/onap/music/unittests/MusicDataStoreTest.java index ab10335e..ec17d17d 100644 --- a/src/test/java/org/onap/music/unittests/MusicDataStoreTest.java +++ b/src/test/java/org/onap/music/unittests/MusicDataStoreTest.java @@ -34,10 +34,10 @@ import org.junit.runners.MethodSorters; import org.mockito.Mock; import org.onap.music.exceptions.MusicQueryException; import org.onap.music.exceptions.MusicServiceException; -import org.onap.music.main.CachingUtil; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.onap.music.authentication.CachingUtil; import org.onap.music.datastore.MusicDataStore; import org.onap.music.datastore.PreparedQueryObject; diff --git a/src/test/java/org/onap/music/unittests/TstRestMusicAdminAPI.java b/src/test/java/org/onap/music/unittests/TstRestMusicAdminAPI.java index 93d8fcb9..58d1d11b 100644 --- a/src/test/java/org/onap/music/unittests/TstRestMusicAdminAPI.java +++ b/src/test/java/org/onap/music/unittests/TstRestMusicAdminAPI.java @@ -193,8 +193,7 @@ public class TstRestMusicAdminAPI { Response response = admin.getOnboardedInfoSearch(jsonOnboard,adminAuthorization); System.out.println("Status: " + response.getStatus() + ". Entity " + response.getEntity()); //TODO FIX when we can authenticate - //should be 401 error - assertEquals(204, response.getStatus()); + assertEquals(401, response.getStatus()); } // Missing appname @@ -254,8 +253,7 @@ public class TstRestMusicAdminAPI { Response response = admin.updateOnboardApp(jsonOnboard,adminAuthorization); System.out.println("Status: " + response.getStatus() + ". Entity " + response.getEntity()); - //Should be 401 error - assertEquals(204, response.getStatus()); + assertEquals(401, response.getStatus()); } // Aid null @@ -295,6 +293,7 @@ public class TstRestMusicAdminAPI { assertNotNull(resultMap); } + @Ignore @Test public void test9_onboardDelete() throws Exception { JsonOnboard jsonOnboard = new JsonOnboard(); @@ -314,8 +313,7 @@ public class TstRestMusicAdminAPI { Response response = admin.deleteOnboardApp(jsonOnboard,adminAuthorization); System.out.println("Status: " + response.getStatus() + ". Entity " + response.getEntity()); - //Should be 401 error - assertEquals(204, response.getStatus()); + assertEquals(401, response.getStatus()); } @Ignore diff --git a/src/test/java/org/onap/music/unittests/TstRestMusicConditionalAPI.java b/src/test/java/org/onap/music/unittests/TstRestMusicConditionalAPI.java index e253d185..3adab912 100644 --- a/src/test/java/org/onap/music/unittests/TstRestMusicConditionalAPI.java +++ b/src/test/java/org/onap/music/unittests/TstRestMusicConditionalAPI.java @@ -39,6 +39,7 @@ import org.mindrot.jbcrypt.BCrypt; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; +import org.onap.music.authentication.CachingUtil; import org.onap.music.conductor.conditionals.JsonConditional; import org.onap.music.conductor.conditionals.RestMusicConditionalAPI; import org.onap.music.datastore.MusicDataStoreHandle; @@ -50,7 +51,6 @@ import org.onap.music.datastore.jsonobjects.JsonSelect; import org.onap.music.datastore.jsonobjects.JsonTable; import org.onap.music.datastore.jsonobjects.JsonUpdate; import org.onap.music.exceptions.MusicServiceException; -import org.onap.music.main.CachingUtil; import org.onap.music.main.MusicCore; import org.onap.music.main.MusicUtil; import org.onap.music.main.ResultType; diff --git a/src/test/java/org/onap/music/unittests/TstRestMusicDataAPI.java b/src/test/java/org/onap/music/unittests/TstRestMusicDataAPI.java index a4ea84f0..07a1b8e1 100644 --- a/src/test/java/org/onap/music/unittests/TstRestMusicDataAPI.java +++ b/src/test/java/org/onap/music/unittests/TstRestMusicDataAPI.java @@ -39,6 +39,7 @@ import org.mindrot.jbcrypt.BCrypt; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; +import org.onap.music.authentication.CachingUtil; import org.onap.music.datastore.MusicDataStoreHandle; import org.onap.music.datastore.PreparedQueryObject; import org.onap.music.datastore.jsonobjects.JsonDelete; @@ -48,7 +49,6 @@ import org.onap.music.datastore.jsonobjects.JsonSelect; import org.onap.music.datastore.jsonobjects.JsonTable; import org.onap.music.datastore.jsonobjects.JsonUpdate; import org.onap.music.exceptions.MusicServiceException; -import org.onap.music.main.CachingUtil; import org.onap.music.main.MusicCore; import org.onap.music.main.MusicUtil; import org.onap.music.main.ResultType; diff --git a/src/test/java/org/onap/music/unittests/TstRestMusicLockAPI.java b/src/test/java/org/onap/music/unittests/TstRestMusicLockAPI.java index 7e45e160..3896c52f 100644 --- a/src/test/java/org/onap/music/unittests/TstRestMusicLockAPI.java +++ b/src/test/java/org/onap/music/unittests/TstRestMusicLockAPI.java @@ -36,6 +36,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mindrot.jbcrypt.BCrypt; import org.mockito.junit.MockitoJUnitRunner; +import org.onap.music.authentication.CachingUtil; import org.onap.music.datastore.MusicDataStoreHandle; import org.onap.music.datastore.PreparedQueryObject; import org.onap.music.datastore.jsonobjects.JsonInsert; @@ -43,7 +44,6 @@ import org.onap.music.datastore.jsonobjects.JsonLeasedLock; import org.onap.music.datastore.jsonobjects.JsonTable; import org.onap.music.exceptions.MusicServiceException; import org.onap.music.lockingservice.cassandra.CassaLockStore; -import org.onap.music.main.CachingUtil; import org.onap.music.main.MusicCore; import org.onap.music.main.MusicUtil; import org.onap.music.rest.RestMusicDataAPI; |