diff options
author | 2020-09-25 16:34:15 +0100 | |
---|---|---|
committer | 2020-09-30 12:55:15 +0000 | |
commit | 1defa8a586f67b2cae78abc029d282dfe762d2b7 (patch) | |
tree | 37c59fe9dc2dd6c986ced1df96e91152ca110437 /src | |
parent | 6c6a31f57aedf4e84cc0fda978b1a54d27a0c75a (diff) |
Unit test fails due to cleanup
When building CLAMP, a test failure was noticed on the
LoopRepositoriesItCase test case. THe root cause was because the
LoopRepositoriesItCase did not clean up its test configuraiton. When the
test order randomly changed, this test was run before the
LoopRepositoriesItCase test case, causing that test case to fail due to
test data residue.
Issue-ID: CLAMP-946
Signed-off-by: liamfallon <liam.fallon@est.tech>
(cherry picked from commit 909be39ba9b573b9b77e9b3543fa6ffa7bd63cbb)
Change-Id: I6886843555b97a7ffe66e6d2166c08ca29d62d01
Diffstat (limited to 'src')
-rw-r--r-- | src/test/java/org/onap/clamp/clds/it/AuthorizationControllerItCase.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/java/org/onap/clamp/clds/it/AuthorizationControllerItCase.java b/src/test/java/org/onap/clamp/clds/it/AuthorizationControllerItCase.java index 3406042c1..207e93684 100644 --- a/src/test/java/org/onap/clamp/clds/it/AuthorizationControllerItCase.java +++ b/src/test/java/org/onap/clamp/clds/it/AuthorizationControllerItCase.java @@ -6,6 +6,7 @@ * reserved. * ================================================================================ * Modifications Copyright (c) 2019 Samsung + * Modifications Copyright (C) 2020 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +33,7 @@ import static org.junit.Assert.assertTrue; import java.util.Arrays; import java.util.Collection; import org.apache.camel.Exchange; +import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; @@ -111,6 +113,12 @@ public class AuthorizationControllerItCase { } + @AfterClass + + public static void afterCleanup() { + sc.setAuthentication(null); + } + @Test public void testIsUserPermitted() { assertEquals(AuthorizationController.getPrincipalName(sc),"admin"); |