INNER CODE UNIT · Python

setUp

spantaleev/matrix-docker-ansible-deploy · bin/test-molecule-select-roles.py:27

    def setUp(self):
        self.temp = tempfile.TemporaryDirectory()
        self.addCleanup(self.temp.cleanup)
        self.root = Path(self.temp.name)
        self.git = selector.Git(self.root)
        self.git.run("init", "--quiet", "--initial-branch=main")
        self.git.run("config", "user.name", "Molecule selector test")
        self.git.run("config", "user.email", "test@example.com")
        self.git.run("config", "commit.gpgsign", "false")
        self.roles = ["matrix-database", "matrix-livekit", "matrix-web"]
        self.write(selector.IMAGE_VARS, '\n'.join([
            '---',
            'molecule_shared_image_curl: "curl:1"',
            'molecule_shared_image_postgres: "postgres:1"',
            'molecule_shared_image_livekit: "livekit:1"',
        ]) + '\n')
        self.write("molecule-shared/requirements.yml", "roles: []\n")
        self.write("molecule-shared/tasks/postgres.yml", '{{ molecule_shared_image_postgres }}\n')

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…