def test_find_config_file(self, tmp_path: Path) -> None: """Test find_config_file.""" test_01 = tmp_path / "01-config.yaml" test_01.touch() test_02 = tmp_path / "02-config.yml" test_02.touch() test_03 = tmp_path / "03-config.yaml" test_03.touch() (tmp_path / "no-match").touch() (tmp_path / "buildspec.yml").touch() (tmp_path / "docker-compose.yml").touch() (tmp_path / "runway.yml").touch() (tmp_path / "runway.yaml").touch() (tmp_path / "runway.module.yml").touch() (tmp_path / "runway.module.yaml").touch() assert CfnginConfig.find_config_file(tmp_path) == [ test_01, test_02, test_03 ]
def test_find_config_file_no_path(self, cd_tmp_path: Path) -> None: """Test find_config_file without providing a path.""" test = cd_tmp_path / "config.yml" test.touch() assert CfnginConfig.find_config_file() == [test]
def test_find_config_file_file(self, tmp_path: Path) -> None: """Test find_config_file with file provided as path.""" test = tmp_path / "config.yml" test.touch() assert CfnginConfig.find_config_file(test) == [test]