INNER CODE UNIT · Python
bump
spantaleev/matrix-docker-ansible-deploy · bin/test-molecule-select-roles.py:76
def bump(self, image):
path = self.path(selector.IMAGE_VARS)
path.write_text(path.read_text().replace(f'"{image}:1"', f'"{image}:2"'))
def selected(self, base=None):
self.commit()
with contextlib.redirect_stderr(io.StringIO()):
return selector.select_roles(self.git, base or self.base)
def test_livekit_bump_only_runs_its_consumer(self):
self.bump("livekit")
self.assertEqual(self.selected(), ["matrix-livekit"])
def test_postgres_bump_follows_shared_task(self):
self.bump("postgres")
self.assertEqual(self.selected(), ["matrix-database"])
def test_curl_bump_runs_every_consumer(self):