Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 255284 - Additional composite repository tests
Summary: Additional composite repository tests
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M4   Edit
Assignee: Andrew Cattle CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-13 17:59 EST by John Arthorne CLA
Modified: 2008-11-19 17:43 EST (History)
1 user (show)

See Also:


Attachments
Adds additional test cases (18.49 KB, patch)
2008-11-14 16:40 EST, Andrew Cattle CLA
john.arthorne: iplog+
Details | Diff
Testdata for invalid composite artifact repository metadata (1.85 KB, application/zip)
2008-11-14 16:41 EST, Andrew Cattle CLA
no flags Details
Testdata for invalid composite metadata repositories metadata (1.85 KB, application/zip)
2008-11-14 16:43 EST, Andrew Cattle CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2008-11-13 17:59:06 EST
From looking at test coverage, there are a number of areas in composite repositories that are not tested. We should add tests for:

 - Parsing a malformed composite*.xml file, ensuring an appropriate exception when client class loadRepository
 - The following methods on CompositeArtifactRepository are not tested at all:
   - contains(IArtifactDescriptor)
   - contains(IArtifactKey)
   - getArtifact(IArtifactDescriptor, OutputStream, IProgressMonitor)
   - getArtifacts(IArtifactRequest[], IProgressMonitor

 - CompositeMetadataRepositoryFactory#validate is not tested
Comment 1 Andrew Cattle CLA 2008-11-14 16:40:29 EST
Created attachment 117950 [details]
Adds additional test cases

Adds the additional test cases as well as some quick minor bug fixes.

I'd like to try and get a better verification for the syntax error but the message is a generic "no repository at the location." I'm open to any ideas.

Additionally, I would have liked to see how the parser handed duplicate tags but this is blocked by Bug 255401.

Please use the test data attached below
Comment 2 Andrew Cattle CLA 2008-11-14 16:41:46 EST
Created attachment 117951 [details]
Testdata for invalid composite artifact repository metadata

Unzip into the /testdata/artifactRepo folder, please.
Comment 3 Andrew Cattle CLA 2008-11-14 16:43:07 EST
Created attachment 117952 [details]
Testdata for invalid composite metadata repositories metadata

Unzip into /Testdata/metadataRepo/ folder, please.
Comment 4 John Arthorne CLA 2008-11-19 17:43:29 EST
Thanks Andrew. New tests released.