tools/bdconfig/lib/google_hadoop/bdconfig_lib/config_commands_test.py
def testNormalOperation(self):
    """Test configure_ghfs values wire through to correct xml keys."""
    self._SetDefaultValidFlags()
    self._flag_values_copy.dry_run = False
    self._test_cmd.Run(None)

    conf = xml_configuration.Configuration.FromFile(self._core_site_filename)
    self.assertEqual(6, conf.GetNumProperties())
    self.assertEquals('foo-bucket', conf.GetPropertyValue(
        'fs.gs.system.bucket'))
    self.assertIsNotNone(conf.GetPropertyValue(
        'fs.gs.impl'))
    self.assertEquals('true', conf.GetPropertyValue(
        'fs.gs.auth.service.account.enable'))
    self.assertEquals('google.com:myproject', conf.GetPropertyValue(
        'fs.gs.project.id'))
    self.assertEquals('1', conf.GetPropertyValue(
        'fs.gs.io.buffersize'))
    self.assertIsNotNone(conf.GetPropertyValue(
        'fs.gs.working.dir'))

    with open(self._hadoop_env_filename, 'r') as f:
      self.assertEqual(2, len(f.readlines()))
Test configure_ghfs values wire through to correct xml keys.
Test configure_ghfs values wire through to correct xml keys.
Test configure_ghfs values wire through to correct xml keys .
def testNormalOperation(self):
    self._SetDefaultValidFlags()
    self._flag_values_copy.dry_run = False
    self._test_cmd.Run(None)
    conf = xml_configuration.Configuration.FromFile(self._core_site_filename)
    self.assertEqual(6, conf.GetNumProperties())
    self.assertEquals('foo-bucket', conf.GetPropertyValue(
        'fs.gs.system.bucket'))
    self.assertIsNotNone(conf.GetPropertyValue(
        'fs.gs.impl'))
    self.assertEquals('true', conf.GetPropertyValue(
        'fs.gs.auth.service.account.enable'))
    self.assertEquals('google.com:myproject', conf.GetPropertyValue(
        'fs.gs.project.id'))
    self.assertEquals('1', conf.GetPropertyValue(
        'fs.gs.io.buffersize'))
    self.assertIsNotNone(conf.GetPropertyValue(
        'fs.gs.working.dir'))
    with open(self._hadoop_env_filename, 'r') as f:
      self.assertEqual(2, len(f.readlines()))
def testNormalOperation ( self ) : self . _SetDefaultValidFlags ( ) self . _flag_values_copy . dry_run = False self . _test_cmd . Run ( None ) conf = xml_configuration . Configuration . FromFile ( self . _core_site_filename ) self . assertEqual ( 6 , conf . GetNumProperties ( ) ) self . assertEquals ( 'foo-bucket' , conf . GetPropertyValue ( 'fs.gs.system.bucket' ) ) self . assertIsNotNone ( conf . GetPropertyValue ( 'fs.gs.impl' ) ) self . assertEquals ( 'true' , conf . GetPropertyValue ( 'fs.gs.auth.service.account.enable' ) ) self . assertEquals ( 'google.com:myproject' , conf . GetPropertyValue ( 'fs.gs.project.id' ) ) self . assertEquals ( '1' , conf . GetPropertyValue ( 'fs.gs.io.buffersize' ) ) self . assertIsNotNone ( conf . GetPropertyValue ( 'fs.gs.working.dir' ) ) with open ( self . _hadoop_env_filename , 'r' ) as f : self . assertEqual ( 2 , len ( f . readlines ( ) ) )
Test configure_ghfs values wire through to correct xml keys.
Test configure_ghfs values wire through to correct xml keys .
"""Test configure_ghfs values wire through to correct xml keys."""
self