Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 6925 inventory builder tests failing #6926

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions contrib/inventory_builder/tests/test_inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_ensure_required_groups(self):
groups = ['group1', 'group2']
self.inv.ensure_required_groups(groups)
for group in groups:
self.assertTrue(group in self.inv.yaml_config['all']['children'])
self.assertIn(group, self.inv.yaml_config['all']['children'])

def test_get_host_id(self):
hostnames = ['node99', 'no99de01', '01node01', 'node1.domain',
Expand Down Expand Up @@ -227,8 +227,9 @@ def test_set_kube_master(self):
host = 'node1'

self.inv.set_kube_master([host])
self.assertTrue(
host in self.inv.yaml_config['all']['children'][group]['hosts'])
self.assertIn(
host,
self.inv.yaml_config['all']['children'][group]['hosts'])

def test_set_all(self):
hosts = OrderedDict([
Expand All @@ -246,25 +247,27 @@ def test_set_k8s_cluster(self):

self.inv.set_k8s_cluster()
for host in expected_hosts:
self.assertTrue(
host in
self.assertIn(
host,
self.inv.yaml_config['all']['children'][group]['children'])

def test_set_kube_node(self):
group = 'kube-node'
host = 'node1'

self.inv.set_kube_node([host])
self.assertTrue(
host in self.inv.yaml_config['all']['children'][group]['hosts'])
self.assertIn(
host,
self.inv.yaml_config['all']['children'][group]['hosts'])

def test_set_etcd(self):
group = 'etcd'
host = 'node1'

self.inv.set_etcd([host])
self.assertTrue(
host in self.inv.yaml_config['all']['children'][group]['hosts'])
self.assertIn(
host,
self.inv.yaml_config['all']['children'][group]['hosts'])

def test_scale_scenario_one(self):
num_nodes = 50
Expand Down
2 changes: 1 addition & 1 deletion contrib/inventory_builder/tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
minversion = 1.6
skipsdist = True
envlist = pep8, py33
envlist = pep8, py3

[testenv]
whitelist_externals = py.test
Expand Down