Page MenuHomeDevCentral

Update pillar path for paas_docker.get_subnets
Closed, ResolvedPublic

Description

Tests for rOPS modules/paas_docker.py fail since D2862 / bbc48f9eb26d88737ef040cf036f36655bf25dcc (Salt Tower).

The method get_subnets is used to configure the firewall.

$ cd _tests
$ ./modules/test_paas_docker.py
......EE...
======================================================================
ERROR: test_get_subnets (__main__.Testinstance)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/dereckson/dev/nasqueron/operations/ops-trivial/_tests/./modules/test_paas_docker.py", line 68, in test_get_subnets
    self.assertEqual(expected, docker.get_subnets())
  File "../_modules/paas_docker.py", line 61, in get_subnets
    subnets = [network["subnet"] for network in networks.values()]
  File "../_modules/paas_docker.py", line 61, in <listcomp>
    subnets = [network["subnet"] for network in networks.values()]
KeyError: 'subnet'

======================================================================
ERROR: test_get_subnets_when_none_are_defined (__main__.Testinstance)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/dereckson/dev/nasqueron/operations/ops-trivial/_tests/./modules/test_paas_docker.py", line 75, in test_get_subnets_when_none_are_defined
    self.assertEqual(expected, docker.get_subnets())
  File "../_modules/paas_docker.py", line 61, in get_subnets
    subnets = [network["subnet"] for network in networks.values()]
  File "../_modules/paas_docker.py", line 61, in <listcomp>
    subnets = [network["subnet"] for network in networks.values()]
KeyError: 'subnet'

----------------------------------------------------------------------
Ran 11 tests in 0.015s

FAILED (errors=2)

Event Timeline

dereckson triaged this task as High priority.Apr 2 2023, 13:20
dereckson created this task.
dereckson removed dereckson as the assignee of this task.Mon, Mar 23, 09:23

Unassigning this task to make it available for others.

As I'm not currently working actively on this issue, reset the assignee.

Contributions opportunity. If you’re interested, go ahead and assign yourself. I’m available to share context, review early approaches, or pair if helpful—just tag me.

dereckson claimed this task.