Browse Source

[fb] Fix upload test permissions

Update jenkins tarballs
Romain Rigaux 12 years ago
parent
commit
82704477fd

+ 2 - 6
apps/filebrowser/src/filebrowser/views_test.py

@@ -971,7 +971,6 @@ def test_upload_file():
 
   try:
     USER_NAME = 'test'
-    USER_NAME_NOT_ME = 'not_me'
     HDFS_DEST_DIR = "/tmp/fb-upload-test"
     LOCAL_FILE = __file__
     HDFS_FILE = HDFS_DEST_DIR + '/' + os.path.basename(__file__)
@@ -979,9 +978,6 @@ def test_upload_file():
     cluster.fs.setuser(USER_NAME)
     client = make_logged_in_client(USER_NAME)
 
-    client_not_me = make_logged_in_client(username=USER_NAME_NOT_ME, is_superuser=False, groupname='test')
-    grant_access(USER_NAME_NOT_ME, "test", "filebrowser")
-
     cluster.fs.do_as_superuser(cluster.fs.mkdir, HDFS_DEST_DIR)
     cluster.fs.do_as_superuser(cluster.fs.chown, HDFS_DEST_DIR, USER_NAME, USER_NAME)
     cluster.fs.do_as_superuser(cluster.fs.chmod, HDFS_DEST_DIR, 0700)
@@ -1013,8 +1009,8 @@ def test_upload_file():
     assert_true('already exists' in response['data'], response)
 
     # Upload in / and fails because of missing permissions
-    resp = client_not_me.post('/filebrowser/upload/file',
-                              dict(dest='/', hdfs_file=file(LOCAL_FILE)))
+    resp = client.post('/filebrowser/upload/file',
+                       dict(dest='/', hdfs_file=file(LOCAL_FILE)))
     response = json.loads(resp.content)
     assert_equal(-1, response['status'], response)
     assert_true('Permission denied' in response['data'], response)

+ 2 - 1
desktop/libs/hadoop/src/hadoop/pseudo_hdfs4.py

@@ -418,7 +418,8 @@ class PseudoHdfs4(object):
       'dfs.datanode.ipc.address': '%s:0' % self._fqdn,
       'dfs.replication': 1,
       'dfs.safemode.min.datanodes': 1,
-      'dfs.namenode.fs-limits.min-block-size': '1000'
+      'dfs.namenode.fs-limits.min-block-size': '1000',
+      'dfs.permissions': 'true'
     }
     self._hdfs_site = self._tmppath('conf/hdfs-site.xml')
     write_config(hdfs_configs, self._hdfs_site)

+ 3 - 3
tools/jenkins/build-functions

@@ -38,7 +38,7 @@ check_mtime() {
 # If not specified, it uses the $CDH variable to select an archive location.
 #
 
-CDH_URL=${CDH_URL:-http://nightly.cloudera.com/cdh4/cdh/4/hadoop-2.0.0-cdh4.3.0-SNAPSHOT.tar.gz}
+CDH_URL=${CDH_URL:-http://nightly.cloudera.com/cdh4/cdh/4/hadoop-2.0.0-cdh4.4.0-SNAPSHOT.tar.gz}
 
 CDH_TGZ=$(basename $CDH_URL)
 CDH_VERSION=${CDH_TGZ/.tar.gz/}
@@ -70,7 +70,7 @@ build_hadoop() {
 
 ##########
 
-HIVE_URL=${HIVE_URL:-http://nightly.cloudera.com/cdh4/cdh/4/hive-0.10.0-cdh4.3.0-SNAPSHOT.tar.gz}
+HIVE_URL=${HIVE_URL:-http://nightly.cloudera.com/cdh4/cdh/4/hive-0.10.0-cdh4.4.0-SNAPSHOT.tar.gz}
 
 HIVE_TGZ=$(basename $HIVE_URL)
 HIVE_VERSION=${HIVE_TGZ/.tar.gz/}
@@ -94,7 +94,7 @@ build_hive() {
 }
 
 ##########
-OOZIE_URL=${OOZIE_URL:-http://nightly.cloudera.com/cdh4/cdh/4/oozie-3.3.2-cdh4.3.0-SNAPSHOT.tar.gz}
+OOZIE_URL=${OOZIE_URL:-http://nightly.cloudera.com/cdh4/cdh/4/oozie-3.3.2-cdh4.4.0-SNAPSHOT.tar.gz}
 
 OOZIE_TGZ=$(basename $OOZIE_URL)
 OOZIE_VERSION=${OOZIE_TGZ/.tar.gz/}