| 31 | |
| 32 | |
| 33 | def default_store( |
| 34 | temp_dir, |
| 35 | auth_config: str, |
| 36 | permissions: list[Permission], |
| 37 | ): |
| 38 | runner = CliRunner() |
| 39 | result = runner.run(["init", PROJECT_NAME], cwd=temp_dir) |
| 40 | repo_path = os.path.join(temp_dir, PROJECT_NAME, "feature_repo") |
| 41 | assert result.returncode == 0 |
| 42 | |
| 43 | include_auth_config( |
| 44 | file_path=f"{repo_path}/feature_store.yaml", auth_config=auth_config |
| 45 | ) |
| 46 | |
| 47 | result = runner.run(["--chdir", repo_path, "apply"], cwd=temp_dir) |
| 48 | assert result.returncode == 0 |
| 49 | |
| 50 | fs = FeatureStore(repo_path=repo_path) |
| 51 | |
| 52 | fs.apply(permissions) # type: ignore |
| 53 | |
| 54 | return fs |
| 55 | |
| 56 | |
| 57 | def start_feature_server( |