Ejemplo n.º 1
0
 def test_read_with_templated_config_file(self):
     config_reader = ConfigReader(
         self.test_sceptre_directory,
         {"user_variable": "user_variable_value"}
     )
     config_reader.templating_vars["environment_config"] = {
         "region": "environment_region"
     }
     os.environ["TEST_ENV_VAR"] = "environment_variable_value"
     config = config_reader.read(
         "account/environment/region/security_groups.yaml"
     )
     # self.config.read({"user_variable": "user_variable_value"})
     assert config == {
         'sceptre_dir': config_reader.sceptre_dir,
         "environment_path": "account/environment/region",
         "parameters": {
             "param1": "user_variable_value",
             "param2": "environment_variable_value",
             "param3": "account",
             "param4": "environment",
             "param5": "region",
             "param6": "environment_region"
         }
     }
Ejemplo n.º 2
0
 def test_read_with_empty_config_file(self):
     config_reader = ConfigReader(self.test_sceptre_directory)
     config = config_reader.read("account/environment/region/subnets.yaml")
     assert config == {
         "sceptre_dir": self.test_sceptre_directory,
         "environment_path": "account/environment/region"
     }