コード例 #1
0
 def testOverrideDefaultConfiguration(self):
     source = consulsource.ConsulFilesSource(self.config)
     self.assertEquals(source.conf['datacenter'], 'TEST_DATACENTER')
     self.assertEquals(source.conf['token'], 'TEST_TOKEN')
     self.assertEquals(
         source.conf['passwd_url'],
         'PASSWD_URL?recurse&token=TEST_TOKEN&dc=TEST_DATACENTER')
     self.assertEquals(
         source.conf['group_url'],
         'GROUP_URL?recurse&token=TEST_TOKEN&dc=TEST_DATACENTER')
コード例 #2
0
 def testDefaultConfiguration(self):
     source = consulsource.ConsulFilesSource({})
     self.assertEquals(source.conf['datacenter'],
                       consulsource.ConsulFilesSource.DATACENTER)
     self.assertEquals(source.conf['token'],
                       consulsource.ConsulFilesSource.TOKEN)