mirror of
https://codeberg.org/Toasterson/ips.git
synced 2026-04-10 13:20:42 +00:00
Remove redundant file checks and update test assertions for publisher-specific file paths
- Eliminate obsolete assertions for the root `file` directory as it is no longer created. - Update tests to validate file paths in `publisher`-specific directories, aligning with the updated repository structure. - Simplify `create_directories` by removing unnecessary `file` directory creation.
This commit is contained in:
parent
99dd0fe87c
commit
fc00304038
4 changed files with 2 additions and 7 deletions
|
|
@ -1737,7 +1737,6 @@ impl FileBackend {
|
|||
fn create_directories(&self) -> Result<()> {
|
||||
// Create the main repository directories
|
||||
fs::create_dir_all(self.path.join("publisher"))?;
|
||||
fs::create_dir_all(self.path.join("file"))?;
|
||||
fs::create_dir_all(self.path.join("index"))?;
|
||||
fs::create_dir_all(self.path.join("trans"))?;
|
||||
fs::create_dir_all(self.path.join("obsoleted"))?;
|
||||
|
|
|
|||
|
|
@ -182,7 +182,6 @@ mod tests {
|
|||
// Check that the repository was created
|
||||
assert!(repo_path.exists());
|
||||
assert!(repo_path.join("publisher").exists());
|
||||
assert!(repo_path.join("file").exists());
|
||||
assert!(repo_path.join("index").exists());
|
||||
assert!(repo_path.join("trans").exists());
|
||||
assert!(repo_path.join(REPOSITORY_CONFIG_FILENAME).exists());
|
||||
|
|
@ -270,8 +269,8 @@ mod tests {
|
|||
let manifest_path = manifest_dir.join("example.p5m");
|
||||
publish_package(&mut repo, &manifest_path, &prototype_dir, "test").unwrap();
|
||||
|
||||
// Check that the files were published
|
||||
assert!(repo_path.join("file").exists());
|
||||
// Check that the files were published in the publisher-specific directory
|
||||
assert!(repo_path.join("publisher").join("test").join("file").exists());
|
||||
|
||||
// Get repository information
|
||||
let repo_info = repo.get_info().unwrap();
|
||||
|
|
|
|||
|
|
@ -136,9 +136,7 @@ mod e2e_tests {
|
|||
// Check that the repository was created
|
||||
assert!(repo_path.exists());
|
||||
assert!(repo_path.join("publisher").exists());
|
||||
assert!(repo_path.join("file").exists());
|
||||
assert!(repo_path.join("index").exists());
|
||||
assert!(repo_path.join("pkg").exists());
|
||||
assert!(repo_path.join("trans").exists());
|
||||
assert!(repo_path.join("pkg6.repository").exists());
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ mod tests {
|
|||
// Check that the repository was created
|
||||
assert!(repo_path.exists());
|
||||
assert!(repo_path.join("publisher").exists());
|
||||
assert!(repo_path.join("file").exists());
|
||||
assert!(repo_path.join("index").exists());
|
||||
assert!(repo_path.join("trans").exists());
|
||||
assert!(repo_path.join(REPOSITORY_CONFIG_FILENAME).exists());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue