mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-12-06 15:28:29 +01:00
travis: enable hdfs test
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
@@ -86,7 +86,7 @@ def get_ssh_url():
|
||||
|
||||
|
||||
def get_hdfs_url():
|
||||
return 'hdfs://root@{}{}'.format(os.getenv('HADOOP_CONTAINER_IP'), get_local_storagepath())
|
||||
return 'hdfs://{}@{}{}'.format(getpass.getuser(), os.getenv('HADOOP_CONTAINER_IP'), get_local_storagepath())
|
||||
|
||||
|
||||
def get_aws_storagepath():
|
||||
@@ -295,7 +295,7 @@ class TestDataCloudCLIBase(TestDvc):
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
def _test_cloud(self, remote=None):
|
||||
args = ['-j', '2']
|
||||
args = ['-v', '-j', '2']
|
||||
if remote:
|
||||
args += ['-r', remote]
|
||||
else:
|
||||
|
||||
+5
-5
@@ -398,14 +398,14 @@ class TestReproExternalHDFS(TestReproExternalBase):
|
||||
|
||||
@property
|
||||
def bucket(self):
|
||||
return 'root@' + os.getenv('HADOOP_CONTAINER_IP')
|
||||
return getpass.getuser() + '@' + os.getenv('HADOOP_CONTAINER_IP')
|
||||
|
||||
def cmd(self, i, o):
|
||||
return 'HADOOP_USER_NAME=root hadoop fs -cp {} {}'.format(i, o)
|
||||
return 'hadoop fs -cp {} {}'.format(i, o)
|
||||
|
||||
def write(self, bucket, key, body):
|
||||
url = self.scheme + '://' + bucket + '/' + key
|
||||
p = Popen('HADOOP_USER_NAME=root hadoop fs -rm -f {}'.format(url),
|
||||
p = Popen('hadoop fs -rm -f {}'.format(url),
|
||||
shell=True,
|
||||
executable=os.getenv('SHELL'),
|
||||
stdin=PIPE,
|
||||
@@ -413,7 +413,7 @@ class TestReproExternalHDFS(TestReproExternalBase):
|
||||
stderr=PIPE)
|
||||
p.communicate()
|
||||
|
||||
p = Popen('HADOOP_USER_NAME=root hadoop fs -mkdir -p {}'.format(posixpath.dirname(url)),
|
||||
p = Popen('hadoop fs -mkdir -p {}'.format(posixpath.dirname(url)),
|
||||
shell=True,
|
||||
executable=os.getenv('SHELL'),
|
||||
stdin=PIPE,
|
||||
@@ -428,7 +428,7 @@ class TestReproExternalHDFS(TestReproExternalBase):
|
||||
with open('tmp', 'w+') as fd:
|
||||
fd.write(body)
|
||||
|
||||
p = Popen('HADOOP_USER_NAME=root hadoop fs -copyFromLocal {} {}'.format('tmp', url),
|
||||
p = Popen('hadoop fs -copyFromLocal {} {}'.format('tmp', url),
|
||||
shell=True,
|
||||
executable=os.getenv('SHELL'),
|
||||
stdin=PIPE,
|
||||
|
||||
Reference in New Issue
Block a user