Use puppetdb as PUPPETDB_HOST on Docker

This allows to plug and play a PuppetDB container (or use extra host)
This commit is contained in:
Raphaël Pinson
2017-01-05 12:54:24 +01:00
parent fdc6b00525
commit df91efff33
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
import os import os
PUPPETDB_HOST = os.getenv('PUPPETDB_HOST', 'localhost') PUPPETDB_HOST = os.getenv('PUPPETDB_HOST', 'puppetdb')
PUPPETDB_PORT = int(os.getenv('PUPPETDB_PORT', '8080')) PUPPETDB_PORT = int(os.getenv('PUPPETDB_PORT', '8080'))
# Since this is an env it will alwas be a string, we need # Since this is an env it will alwas be a string, we need
# to conver that string to a bool # to conver that string to a bool

View File

@@ -25,7 +25,7 @@ class DockerTestCase(unittest.TestCase):
reload(docker_settings) reload(docker_settings)
def test_default_host_port(self): def test_default_host_port(self):
self.assertEqual(docker_settings.PUPPETDB_HOST, 'localhost') self.assertEqual(docker_settings.PUPPETDB_HOST, 'puppetdb')
self.assertEqual(docker_settings.PUPPETDB_PORT, 8080) self.assertEqual(docker_settings.PUPPETDB_PORT, 8080)
def test_set_host_port(self): def test_set_host_port(self):