summaryrefslogtreecommitdiff
path: root/test/units/playbook
diff options
context:
space:
mode:
authorMatt Martz <matt@sivel.net>2022-11-29 15:56:41 -0600
committerGitHub <noreply@github.com>2022-11-29 15:56:41 -0600
commit1998521e2d5b89bc53d00639bad178330ebb98df (patch)
tree8c17d0b307f4c514ca11d1af165f2b1100f6885c /test/units/playbook
parentf9715f436ce0590a5441fa7f13c1aa60cdeb6585 (diff)
downloadansible-1998521e2d5b89bc53d00639bad178330ebb98df.tar.gz
Always create new role (#78661)
Don't use role cache for determining whether to create a new instance of role
Diffstat (limited to 'test/units/playbook')
-rw-r--r--test/units/playbook/role/test_role.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/units/playbook/role/test_role.py b/test/units/playbook/role/test_role.py
index 5d47631fe2..fadce8f5dc 100644
--- a/test/units/playbook/role/test_role.py
+++ b/test/units/playbook/role/test_role.py
@@ -177,7 +177,7 @@ class TestRole(unittest.TestCase):
})
mock_play = MagicMock()
- mock_play.ROLE_CACHE = {}
+ mock_play.role_cache = {}
i = RoleInclude.load('foo_tasks', play=mock_play, loader=fake_loader)
r = Role.load(i, play=mock_play)
@@ -199,7 +199,7 @@ class TestRole(unittest.TestCase):
})
mock_play = MagicMock()
- mock_play.ROLE_CACHE = {}
+ mock_play.role_cache = {}
i = RoleInclude.load('foo_tasks', play=mock_play, loader=fake_loader)
r = Role.load(i, play=mock_play, from_files=dict(tasks='custom_main'))
@@ -217,7 +217,7 @@ class TestRole(unittest.TestCase):
})
mock_play = MagicMock()
- mock_play.ROLE_CACHE = {}
+ mock_play.role_cache = {}
i = RoleInclude.load('foo_handlers', play=mock_play, loader=fake_loader)
r = Role.load(i, play=mock_play)
@@ -238,7 +238,7 @@ class TestRole(unittest.TestCase):
})
mock_play = MagicMock()
- mock_play.ROLE_CACHE = {}
+ mock_play.role_cache = {}
i = RoleInclude.load('foo_vars', play=mock_play, loader=fake_loader)
r = Role.load(i, play=mock_play)
@@ -259,7 +259,7 @@ class TestRole(unittest.TestCase):
})
mock_play = MagicMock()
- mock_play.ROLE_CACHE = {}
+ mock_play.role_cache = {}
i = RoleInclude.load('foo_vars', play=mock_play, loader=fake_loader)
r = Role.load(i, play=mock_play)
@@ -280,7 +280,7 @@ class TestRole(unittest.TestCase):
})
mock_play = MagicMock()
- mock_play.ROLE_CACHE = {}
+ mock_play.role_cache = {}
i = RoleInclude.load('foo_vars', play=mock_play, loader=fake_loader)
r = Role.load(i, play=mock_play)
@@ -303,7 +303,7 @@ class TestRole(unittest.TestCase):
})
mock_play = MagicMock()
- mock_play.ROLE_CACHE = {}
+ mock_play.role_cache = {}
i = RoleInclude.load('foo_vars', play=mock_play, loader=fake_loader)
r = Role.load(i, play=mock_play)
@@ -323,7 +323,7 @@ class TestRole(unittest.TestCase):
})
mock_play = MagicMock()
- mock_play.ROLE_CACHE = {}
+ mock_play.role_cache = {}
i = RoleInclude.load('foo_vars', play=mock_play, loader=fake_loader)
r = Role.load(i, play=mock_play)
@@ -370,7 +370,7 @@ class TestRole(unittest.TestCase):
mock_play = MagicMock()
mock_play.collections = None
- mock_play.ROLE_CACHE = {}
+ mock_play.role_cache = {}
i = RoleInclude.load('foo_metadata', play=mock_play, loader=fake_loader)
r = Role.load(i, play=mock_play)
@@ -415,7 +415,7 @@ class TestRole(unittest.TestCase):
})
mock_play = MagicMock()
- mock_play.ROLE_CACHE = {}
+ mock_play.role_cache = {}
i = RoleInclude.load(dict(role='foo_complex'), play=mock_play, loader=fake_loader)
r = Role.load(i, play=mock_play)