Refactor test fixtures and consolidate Salt dev files#30
Conversation
There was a problem hiding this comment.
Pull request overview
This PR deprecates the legacy top-level Nexus3 Salt state tree by removing the nexus3/ SLS/Jinja files and updating local dev/docs references to use the test/example Salt fixtures under tests/files/salt/.
Changes:
- Removed the top-level Nexus3 Salt state files (
nexus3/*.sls,nexus3/map.jinja). - Added/updated Salt pillar fixtures under
tests/files/salt/pillarfor example/dev usage. - Updated
docker-compose.ymlandREADME.mdto reference the test/example fixture locations.
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/files/salt/pillar/top.sls | Adds a pillar top file for the test/example pillar tree. |
| tests/files/salt/pillar/nexus3.sls | Adds a comprehensive example pillar for Nexus3 provisioning/config tests. |
| README.md | Updates example paths to point to tests/files/salt/*. |
| docker-compose.yml | Changes volume mounts to use the test/example Salt and pillar fixtures. |
| nexus3/init.sls | Removed legacy top-level Nexus3 state (container/user/data dir setup). |
| nexus3/setup.sls | Removed legacy orchestration include state. |
| nexus3/blobstores.sls | Removed legacy blobstore state. |
| nexus3/repositories.sls | Removed legacy repository state. |
| nexus3/privileges.sls | Removed legacy privileges state. |
| nexus3/roles.sls | Removed legacy roles state. |
| nexus3/users.sls | Removed legacy users state. |
| nexus3/scripts.sls | Removed legacy scripts/tasks state. |
| nexus3/map.jinja | Removed legacy pillar-to-state mapping template. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - [API Modules Reference](docs/ref/modules.rst) | ||
| - [API States Reference](docs/ref/states.rst) | ||
|
|
||
| The files under the `nexus3` and `salt/pillar` folders can be used as examples for using these modules. | ||
| The files under `tests/files/salt/nexus3` and `tests/files/salt/pillar` can be used as examples for using these modules. | ||
|
|
There was a problem hiding this comment.
PR description says the Nexus3 Salt states/pillar files were deleted, but the PR also adds/keeps Salt example files under tests/files/salt/* and updates docs to point at them. Please clarify the PR description to reflect that the legacy top-level state tree was removed/moved, not eliminated entirely.
This pull request removes the legacy SaltStack state files and related Jinja configuration for Nexus3, and updates documentation and development environment configuration to match the new file structure. The main focus is on cleaning up obsolete automation code and ensuring that tests and examples reference the correct locations.
Key changes include:
Removal of duplicate Salt state files and configuration:
init.sls,setup.sls, and individual resource states likeblobstores.sls,privileges.sls,repositories.sls,roles.sls,users.sls, andscripts.sls, as well as the sharedmap.jinjafile. These files are no longer needed as part of the new setup. [1] [2] [3] [4] [5] [6] [7] [8] [9]Documentation and development environment updates:
README.mdto point to the new example file locations undertests/files/salt/nexus3andtests/files/salt/pillarinstead of the old directories.docker-compose.ymlto mount the new test file locations fornexus3andpillarin the Salt master container, ensuring the development environment uses the updated structure.