Пример #1
0
 def test_pool_config_no_db_section(self):
     self.build_pool_config_file(
             '[pool]\nname=pool\ngrant_address=Bxxxxxxxxxxxxxxxx\nminimum_payout=1\n'
             '[rpc]\nuser=nu\npass=12345678\nhost=127.0.0.1\nport=14002')
     check = config.check_pool_config('test_pool_config')
     self.assertFalse(check[0])
     self.assertEqual(check[1], "No section: 'db'")
Пример #2
0
 def test_pool_config_full(self):
     self.build_pool_config_file(
             '[pool]\nname=pool\ngrant_address=Bxxxxxxxxxxxxxxxxx\nminimum_payout=1\n'
             '[rpc]\nuser=nu\npass=12345678\nhost=127.0.0.1\nport=14002\n[db]\n'
             'name=alp\nuser=alp\npass=Trip-Tough-Basis-Brother-2\nhost=localhost\n'
             'port=5432')
     self.assertTrue(config.check_pool_config('test_pool_config'))
Пример #3
0
 def test_pool_config_report_first_missing(self):
     self.build_pool_config_file(
             '[pool]\nname=pool\n\nminimum_payout=1\n'
             '[rpc]\nuser=nu\npass=12345678\nhost=127.0.0.1\nport=14002\n[db]\n'
             'name=alp\nuser=alp\npass=Trip-Tough-Basis-Brother-2\nhost=localhost')
     check = config.check_pool_config('test_pool_config')
     self.assertFalse(check[0])
     self.assertEqual(check[1], "No option 'grant_address' in section: 'pool'")
Пример #4
0
 def test_pool_config_no_db_host(self):
     self.build_pool_config_file(
             '[pool]\nname=pool\ngrant_address=Bxxxxxxxxxxxxxxxxx\nminimum_payout=1\n'
             '[rpc]\nuser=nu\npass=12345678\nhost=127.0.0.1\nport=14002\n[db]\n'
             'name=alp\nuser=alp\npass=Trip-Tough-Basis-Brother-2\nport=5432')
     check = config.check_pool_config('test_pool_config')
     self.assertFalse(check[0])
     self.assertEqual(check[1], "No option 'host' in section: 'db'")
Пример #5
0
 def test_pool_config_no_rpc_section(self):
     self.build_pool_config_file(
             '[pool]\nname=pool\ngrant_address=Bxxxxxxxxxxxxxxxx\nminimum_payout=1\n'
             '[db]\nname=alp\nuser=alp\npass=Trip-Tough-Basis-Brother-2\n'
             'host=localhost\nport=5432')
     check = config.check_pool_config('test_pool_config')
     self.assertFalse(check[0])
     self.assertEqual(check[1], "No section: 'rpc'")
Пример #6
0
 def test_pool_config_no_pool_section(self):
     self.build_pool_config_file(
             '[rpc]\nuser=nu\npass=12345678\nhost=127.0.0.1\nport=14002\n[db]\n'
             'name=alp\nuser=alp\npass=Trip-Tough-Basis-Brother-2\nhost=localhost\n'
             'port=5432')
     check = config.check_pool_config('test_pool_config')
     self.assertFalse(check[0])
     self.assertEqual(check[1], "No section: 'pool'")
Пример #7
0
 def test_pool_config_empty(self):
     self.build_pool_config_file('')
     check = config.check_pool_config('test_pool_config')
     self.assertFalse(check[0])