tools/bdconfig/lib/google_hadoop/bdconfig_lib/config_commands_test.py
def testFlagValidation(self):
    """Test basic flag failures for configure_hdfs."""
    # Validators.
    failure_modes = [
        ('hadoop_conf_dir', '/unreadable/path'),
        ('hadoop_conf_dir', None),
        ('hdfs_data_dirs', None),
        ('hdfs_data_dirs', FLAGS.test_tmpdir + ' /unreadable.path'),
        ('hdfs_name_dir', None),
        ('hdfs_name_dir', 'conf'),
        ('namenode_uri', None),
        ('namenode_uri', 'badscheme://localhost:8020/'),
        # Missing trailing slash.
        ('namenode_uri', 'hdfs://localhost:8020'),
    ]
    self._ValidateFlagFailures(failure_modes)
Test basic flag failures for configure_hdfs.
Test basic flag failures for configure_hdfs.
Test basic flag failures for configure_hdfs .
def testFlagValidation(self):
    failure_modes = [
        ('hadoop_conf_dir', '/unreadable/path'),
        ('hadoop_conf_dir', None),
        ('hdfs_data_dirs', None),
        ('hdfs_data_dirs', FLAGS.test_tmpdir + ' /unreadable.path'),
        ('hdfs_name_dir', None),
        ('hdfs_name_dir', 'conf'),
        ('namenode_uri', None),
        ('namenode_uri', 'badscheme://localhost:8020/'),
        ('namenode_uri', 'hdfs://localhost:8020'),
    ]
    self._ValidateFlagFailures(failure_modes)
def testFlagValidation ( self ) : failure_modes = [ ( 'hadoop_conf_dir' , '/unreadable/path' ) , ( 'hadoop_conf_dir' , None ) , ( 'hdfs_data_dirs' , None ) , ( 'hdfs_data_dirs' , FLAGS . test_tmpdir + ' /unreadable.path' ) , ( 'hdfs_name_dir' , None ) , ( 'hdfs_name_dir' , 'conf' ) , ( 'namenode_uri' , None ) , ( 'namenode_uri' , 'badscheme://localhost:8020/' ) , ( 'namenode_uri' , 'hdfs://localhost:8020' ) , ] self . _ValidateFlagFailures ( failure_modes )
Test basic flag failures for configure_hdfs.
Test basic flag failures for configure_hdfs .
"""Test basic flag failures for configure_hdfs.""" # Validators. # Missing trailing slash.
self