瀏覽代碼

commit 0a23cf082a22c5ccd97d4c91959f4211ef15d710
Author: Boris Shkolnik <borya@yahoo-inc.com>
Date: Fri Jul 16 10:44:49 2010 -0700

HDFS:1301 from https://issues.apache.org/jira/secure/attachment/12449573/HDFS-1301-BP20.patch

+++ b/YAHOO-CHANGES.txt
+ HDFS-1301. TestHDFSProxy need to use server side conf for ProxyUser
+ stuff.(boryas)
+


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-patches@1077552 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 年之前
父節點
當前提交
72c9858530
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/contrib/hdfsproxy/src/test/org/apache/hadoop/hdfsproxy/TestHdfsProxy.java

+ 5 - 0
src/contrib/hdfsproxy/src/test/org/apache/hadoop/hdfsproxy/TestHdfsProxy.java

@@ -40,6 +40,7 @@ import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.hadoop.hdfs.server.datanode.DataNode;
 import org.apache.hadoop.hdfs.server.datanode.DataNode;
 import org.apache.hadoop.hdfs.server.namenode.FSNamesystem;
 import org.apache.hadoop.hdfs.server.namenode.FSNamesystem;
 import org.apache.hadoop.net.NetUtils;
 import org.apache.hadoop.net.NetUtils;
+import org.apache.hadoop.security.authorize.ProxyUsers;
 
 
 /**
 /**
  * A JUnit test for HdfsProxy
  * A JUnit test for HdfsProxy
@@ -210,6 +211,10 @@ public class TestHdfsProxy extends TestCase {
       dfsConf.set("hadoop.proxyuser." + System.getProperty("user.name") +
       dfsConf.set("hadoop.proxyuser." + System.getProperty("user.name") +
           ".hosts", "127.0.0.1,localhost");
           ".hosts", "127.0.0.1,localhost");
       dfsConf.set("hadoop.security.authentication", "simple");
       dfsConf.set("hadoop.security.authentication", "simple");
+      
+      //make sure server will look at the right config
+      ProxyUsers.refreshSuperUserGroupsConfiguration(dfsConf);
+      
       cluster = new MiniDFSCluster(dfsConf, 2, true, null);
       cluster = new MiniDFSCluster(dfsConf, 2, true, null);
       cluster.waitActive();
       cluster.waitActive();