diff options
author | Rodrigo Lima <rodrigo.lima@yoppworks.com> | 2020-05-11 15:54:37 -0400 |
---|---|---|
committer | Ofir Sonsino <ofir.sonsino@intl.att.com> | 2020-05-12 06:21:23 +0000 |
commit | f2b6c943b558fcc5161b30ac30c1010066a135ae (patch) | |
tree | f84c3a18a7a123e68b65088ae78d714435617a29 /openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test | |
parent | 052b66bed19c2ee0b7ef6c992ee709a1db90a73e (diff) |
Remove powermock from SecurityManagerTest
- Add new package level constructor to SecurityManager
- Remove powermock from SecurityManagerTest
Issue-ID: SDC-3054
Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com>
Change-Id: I04c53601f31d2aad84de8f8801f6889f8b9d4260
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test')
-rw-r--r-- | openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/security/SecurityManagerTest.java | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/security/SecurityManagerTest.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/security/SecurityManagerTest.java index b1d6fdc97d..7c5cb662c7 100644 --- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/security/SecurityManagerTest.java +++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/security/SecurityManagerTest.java @@ -24,11 +24,6 @@ import org.apache.commons.io.FileUtils; import org.junit.After; import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.powermock.api.mockito.PowerMockito; -import org.powermock.core.classloader.annotations.PowerMockIgnore; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.junit4.PowerMockRunner; import java.io.File; import java.io.IOException; @@ -38,11 +33,7 @@ import java.nio.file.Paths; import static junit.framework.TestCase.assertEquals; import static junit.framework.TestCase.assertTrue; -import static org.mockito.ArgumentMatchers.eq; -@RunWith(PowerMockRunner.class) -@PrepareForTest(SecurityManager.class) -@PowerMockIgnore("javax.security.auth.x500.X500Principal") public class SecurityManagerTest { private File certDir; private SecurityManager securityManager; @@ -54,9 +45,7 @@ public class SecurityManagerTest { tearDown(); } certDir.mkdirs(); - PowerMockito.mockStatic(System.class); - PowerMockito.when(System.getenv(eq("SDC_CERT_DIR"))).thenReturn(certDir.getPath()); - securityManager = SecurityManager.getInstance(); + securityManager = new SecurityManager(certDir.getPath()); } @After |