diff --git a/docker-compose.yml b/docker-compose.yml index 01a1d32..7fe7e7e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ %YAML 1.2 --- consul: - image: consul:1.0.6 + image: consul:1.6.0 ports: - 8500 volumes: diff --git a/testing/consul.json b/testing/consul.json index d74dcd4..3368abc 100644 --- a/testing/consul.json +++ b/testing/consul.json @@ -1,9 +1,16 @@ { - "acl_datacenter": "test", - "acl_master_token": "9ae5fe1a-6b38-47e5-a0e7-f06b8b2fa645", - "bootstrap": true, + "acl": { + "enabled": true, + "enable_key_list_policy": true, + "tokens": { + "master": "9ae5fe1a-6b38-47e5-a0e7-f06b8b2fa645" + } + }, + "bootstrap_expect": 1, "data_dir": "/tmp/consul", "datacenter": "test", "server": true, + "bind_addr": "{{ GetPrivateIP }}", + "client_addr": "0.0.0.0", "enable_script_checks": true } diff --git a/tests/api_tests.py b/tests/api_tests.py index 481e510..cad5710 100644 --- a/tests/api_tests.py +++ b/tests/api_tests.py @@ -35,7 +35,7 @@ def setUp(self, status, session, event, acl, health, coordinate, kv, catalog, ag self.host = '127.0.0.1' self.port = 8500 self.dc = CONSUL_CONFIG['datacenter'] - self.token = CONSUL_CONFIG['acl_master_token'] + self.token = CONSUL_CONFIG['acl']['tokens']['master'] self.acl = acl self.adapter = adapter @@ -98,7 +98,7 @@ def test_health_initialization(self): def test_coordinate_initialization(self): self.assertTrue( self.coordinate.called_once_with(self.base_uri, self.adapter, self.dc, - self.token)) + self.token)) def test_session_initialization(self): self.assertTrue( diff --git a/tests/base.py b/tests/base.py index 714abff..0685d65 100644 --- a/tests/base.py +++ b/tests/base.py @@ -33,7 +33,7 @@ def setUp(self): self.consul = consulate.Consul( host=os.environ['CONSUL_HOST'], port=os.environ['CONSUL_PORT'], - token=CONSUL_CONFIG['acl_master_token']) + token=CONSUL_CONFIG['acl']['tokens']['master']) self.forbidden_consul = consulate.Consul( host=os.environ['CONSUL_HOST'], port=os.environ['CONSUL_PORT'], @@ -53,7 +53,7 @@ def tearDown(self): self.consul.agent.service.deregister(services[name]['ID']) for acl in self.consul.acl.list(): - if acl['ID'] == CONSUL_CONFIG['acl_master_token']: + if acl['ID'] == CONSUL_CONFIG['acl']['tokens']['master']: continue try: uuid.UUID(acl['ID'])