Commit 699498d7 by svimal2106

Tests SSLAndKerberosTest.testService and SSLTest.testService are failing

parent 1fa05264
......@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
ALL CHANGES:
ATLAS-1313 Tests SSLAndKerberosTest.testService and SSLTest.testService are failing (ayubkhan via svimal2106)
ATLAS-1116 Performance monitoring of backend methods in API requests (shwethags)
ATLAS-1310 attempt LDAP authentication only when enabled (mneethiraj)
ATLAS-1309 updated HBase model with addition of column-family and column entity-defs (mneethiraj)
......
......@@ -51,4 +51,9 @@ public class TestUtils {
return System.getProperty("projectBaseDir") + String.format("/webapp/target/atlas-webapp-%s",
System.getProperty("project.version"));
}
public static String getTargetDirectory() {
return System.getProperty("projectBaseDir") + "/webapp/target" ;
}
}
......@@ -57,6 +57,7 @@ public class SSLAndKerberosTest extends BaseSSLAndKerberosTest {
private TestSecureEmbeddedServer secureEmbeddedServer;
private Subject subject;
private String originalConf;
private String originalHomeDir;
@BeforeClass
public void setUp() throws Exception {
......@@ -118,6 +119,9 @@ public class SSLAndKerberosTest extends BaseSSLAndKerberosTest {
originalConf = System.getProperty("atlas.conf");
System.setProperty("atlas.conf", persistDir);
originalHomeDir = System.getProperty("atlas.home");
System.setProperty("atlas.home", TestUtils.getTargetDirectory());
dgiCLient = proxyUser.doAs(new PrivilegedExceptionAction<AtlasClient>() {
@Override
public AtlasClient run() throws Exception {
......@@ -148,6 +152,10 @@ public class SSLAndKerberosTest extends BaseSSLAndKerberosTest {
if (originalConf != null) {
System.setProperty("atlas.conf", originalConf);
}
if(originalHomeDir !=null){
System.setProperty("atlas.home", originalHomeDir);
}
}
protected Subject loginTestUser() throws LoginException, IOException {
......
......@@ -19,6 +19,7 @@
package org.apache.atlas.web.security;
import org.apache.atlas.AtlasClient;
import org.apache.atlas.web.TestUtils;
import org.apache.atlas.web.service.SecureEmbeddedServer;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.hadoop.conf.Configuration;
......@@ -46,6 +47,7 @@ public class SSLTest extends BaseSSLAndKerberosTest {
private String providerUrl;
private TestSecureEmbeddedServer secureEmbeddedServer;
private String originalConf;
private String originalHomeDir;
class TestSecureEmbeddedServer extends SecureEmbeddedServer {
......@@ -79,6 +81,9 @@ public class SSLTest extends BaseSSLAndKerberosTest {
originalConf = System.getProperty("atlas.conf");
System.setProperty("atlas.conf", persistDir);
originalHomeDir = System.getProperty("atlas.home");
System.setProperty("atlas.home", TestUtils.getTargetDirectory());
atlasClient = new AtlasClient(configuration, new String[]{DGI_URL},new String[]{"admin","admin"});
secureEmbeddedServer = new TestSecureEmbeddedServer(21443, getWarPath()) {
......@@ -99,6 +104,10 @@ public class SSLTest extends BaseSSLAndKerberosTest {
if (originalConf != null) {
System.setProperty("atlas.conf", originalConf);
}
if(originalHomeDir !=null){
System.setProperty("atlas.home", originalHomeDir);
}
}
protected void setupCredentials() throws Exception {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment