summaryrefslogtreecommitdiffstats
path: root/dcae-cli/dcae_cli/util/tests/test_discovery.py
diff options
context:
space:
mode:
authorLusheng Ji <lji@research.att.com>2018-03-11 00:51:35 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-11 00:51:35 +0000
commitf9242fb6fd592a14b09761dfb58fb7f7e7c56607 (patch)
tree80add99f51d10c0d18ee3aa1d01eeeb8d75f5402 /dcae-cli/dcae_cli/util/tests/test_discovery.py
parented0e21efa55bce913ccfb9ab6c20333f7fba7605 (diff)
parentb11dae55f54720759431107e83f1070c10aacd96 (diff)
Merge "Make tox work in a fresh scenario"
Diffstat (limited to 'dcae-cli/dcae_cli/util/tests/test_discovery.py')
-rw-r--r--dcae-cli/dcae_cli/util/tests/test_discovery.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/dcae-cli/dcae_cli/util/tests/test_discovery.py b/dcae-cli/dcae_cli/util/tests/test_discovery.py
index 0832c5e..b37ac17 100644
--- a/dcae-cli/dcae_cli/util/tests/test_discovery.py
+++ b/dcae-cli/dcae_cli/util/tests/test_discovery.py
@@ -1,7 +1,7 @@
# ============LICENSE_START=======================================================
# org.onap.dcae
# ================================================================================
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ from copy import deepcopy
import pytest
from dcae_cli.util import discovery as dis
-from dcae_cli.util.discovery import create_config, Consul, config_context, consul_host, DiscoveryNoDownstreamComponentError
+from dcae_cli.util.discovery import create_config, Consul, config_context, DiscoveryNoDownstreamComponentError
user = 'bob'
@@ -177,8 +177,8 @@ def test_create_config():
assert dmaap_map == {'some-config-key': {'topic_url': 'http://some-topic-url.com/abc'}}
-
-def test_config_context():
+@pytest.mark.skip(reason="Not a pure unit test")
+def test_config_context(mock_cli_config):
interface_map = {'param1': [('foo.bar.comp1', '1.1.1'),
('foo.bar.comp2', '2.2.2')],
'param2': [('foo.bar.comp3', '3.3.3')]
@@ -200,7 +200,7 @@ def test_config_context():
'bob.bbb222.1-1-1.foo-bar-comp1.suffix',
'bob.ddd444.3-3-3.foo-bar-comp3.suffix']
- c = Consul(consul_host)
+ c = Consul(dis.default_consul_host())
with config_context(user, cname, cver, params, interface_map, instance_map,
config_key_map, instance_prefix=inst_pref) as (instance,_):
assert json.loads(c.kv.get(ckey)[1]['Value'].decode('utf-8')) == expected_conf