mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-19 15:28:28 +01:00
travis: run hdfs test only on Linux
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
@@ -5,6 +5,7 @@ import uuid
|
||||
import shutil
|
||||
import getpass
|
||||
import tempfile
|
||||
import platform
|
||||
|
||||
from dvc.main import main
|
||||
from dvc.config import Config, ConfigError
|
||||
@@ -66,11 +67,7 @@ def _should_test_ssh():
|
||||
|
||||
|
||||
def _should_test_hdfs():
|
||||
if os.name == 'nt':
|
||||
return False
|
||||
if os.getenv('HADOOP_CONTAINER_IP'):
|
||||
return True
|
||||
return False
|
||||
return platform.system() == 'Linux'
|
||||
|
||||
|
||||
def get_local_storagepath():
|
||||
@@ -86,7 +83,7 @@ def get_ssh_url():
|
||||
|
||||
|
||||
def get_hdfs_url():
|
||||
return 'hdfs://{}@{}{}'.format(getpass.getuser(), os.getenv('HADOOP_CONTAINER_IP'), get_local_storagepath())
|
||||
return 'hdfs://{}@127.0.0.1{}'.format(getpass.getuser(), get_local_storagepath())
|
||||
|
||||
|
||||
def get_aws_storagepath():
|
||||
|
||||
+1
-1
@@ -398,7 +398,7 @@ class TestReproExternalHDFS(TestReproExternalBase):
|
||||
|
||||
@property
|
||||
def bucket(self):
|
||||
return getpass.getuser() + '@' + os.getenv('HADOOP_CONTAINER_IP')
|
||||
return '{}@127.0.0.1'.format(getpass.getuser())
|
||||
|
||||
def cmd(self, i, o):
|
||||
return 'hadoop fs -cp {} {}'.format(i, o)
|
||||
|
||||
Reference in New Issue
Block a user