diff options
Diffstat (limited to 'src/test')
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 b00c4fcc..38be56fa 100644 --- a/src/test/java/org/onap/music/unittests/TstRestMusicAdminAPI.java +++ b/src/test/java/org/onap/music/unittests/TstRestMusicAdminAPI.java @@ -194,8 +194,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 @@ -255,8 +254,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 @@ -296,6 +294,7 @@ public class TstRestMusicAdminAPI { assertNotNull(resultMap); } + @Ignore @Test public void test9_onboardDelete() throws Exception { JsonOnboard jsonOnboard = new JsonOnboard(); @@ -315,8 +314,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 1f0e24c2..6e661da6 100644 --- a/src/test/java/org/onap/music/unittests/TstRestMusicConditionalAPI.java +++ b/src/test/java/org/onap/music/unittests/TstRestMusicConditionalAPI.java @@ -40,6 +40,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; @@ -51,7 +52,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 0f0545e8..a8345d86 100644 --- a/src/test/java/org/onap/music/unittests/TstRestMusicDataAPI.java +++ b/src/test/java/org/onap/music/unittests/TstRestMusicDataAPI.java @@ -40,6 +40,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; @@ -49,7 +50,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; |