Ejemplo n.º 1
0
    def test_render_file(self) -> None:
        config: Config = {}
        tutor_config.update_with_base(config)
        tutor_config.update_with_defaults(config)
        tutor_config.render_full(config)

        config["MYSQL_ROOT_PASSWORD"] = "******"
        rendered = env.render_file(config, "hooks", "mysql", "init")
        self.assertIn("testpassword", rendered)
Ejemplo n.º 2
0
 def test_render_file(self):
     config = {}
     tutor_config.merge(config, tutor_config.load_defaults())
     config["MYSQL_ROOT_PASSWORD"] = "******"
     rendered = env.render_file(config, "hooks", "mysql-client", "init")
     self.assertIn("testpassword", rendered)
Ejemplo n.º 3
0
 def test_render_file(self) -> None:
     config: Dict[str, Any] = {}
     tutor_config.merge(config, tutor_config.load_defaults())
     config["MYSQL_ROOT_PASSWORD"] = "******"
     rendered = env.render_file(config, "hooks", "mysql", "init")
     self.assertIn("testpassword", rendered)
Ejemplo n.º 4
0
 def render(self, *path: str) -> str:
     rendered = env.render_file(self.config, *path).strip()
     if isinstance(rendered, bytes):
         raise TypeError("Cannot load job from binary file")
     return rendered
Ejemplo n.º 5
0
 def test_render_file(self):
     config = {}
     tutor_config.merge(config, tutor_config.load_defaults())
     config["MYSQL_ROOT_PASSWORD"] = "******"
     rendered = env.render_file(config, "scripts", "create_databases.sh")
     self.assertIn("testpassword", rendered)