Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test case for PublishFeaturesAndBundlesMojo marking bundle unpacked #3538

Merged

Conversation

HeikoKlare
Copy link
Contributor

The PublishFeaturesAndBundlesMojo produces a p2 repository in which plugins are marked as "zipped" and will thus be unpacked upon installation when a feature including them does not include the plugin with "unpack=false". The added test demonstrates this behavior and ensures that only the feature will properly be marked as "zipped" but not the included plugin.

Since the mojo uses p2's FeaturesAndBundlesPublisherApplication, this test will be influcend by the p2 fix: eclipse-equinox/p2#477

Note that this is only for demonstration purposes and not a proper test case yet. In particular, I was not yet able to properly check the resulting p2 repository, which is why the test simply scans the generated content.xml for "zipped" markers.

Copy link

github-actions bot commented Feb 29, 2024

Test Results

  591 files  ±0    591 suites  ±0   3h 58m 52s ⏱️ - 19m 37s
  407 tests ±0    400 ✅ ±0   7 💤 ±0  0 ❌ ±0 
1 221 runs  ±0  1 199 ✅ ±0  22 💤 ±0  0 ❌ ±0 

Results for commit e3c8ff1. ± Comparison against base commit 27398a5.

♻️ This comment has been updated with latest results.

@laeubi
Copy link
Member

laeubi commented Mar 11, 2024

@HeikoKlare mayn thanks for the test-case, just in case creating a plain maven project in the itest module is most often easier than a "real" unit test.

Also as the eclipse release is done and it is fixed there, I think we can wait for the release, otherwise we need to fork many of the feature classes from P2 what I like to avoid (for now).

@laeubi laeubi force-pushed the publish-features-and-bundles-unpack branch from beb50e7 to 9eb705d Compare March 11, 2024 07:34
The PublishFeaturesAndBundlesMojo produces a p2 repository in which
plugins are marked as "zipped" and will thus be unpacked upon
installation when a feature including them does not include the plugin
with "unpack=false". The added test demonstrates this behavior and
ensures that only the feature will properly be marked as "zipped" but
not the included plugin.
@HeikoKlare HeikoKlare force-pushed the publish-features-and-bundles-unpack branch from 9eb705d to e3c8ff1 Compare March 24, 2024 16:56
@HeikoKlare
Copy link
Contributor Author

Thanks for the hint, @laeubi!

I hope I understood your proposal correctly: I have rewritten the test case in the tycho-its / integration tests, which made the test case itself much simpler.

I have also improved the assertion logic by replacing the rundimentary scanning of content.xml file contents with checking the XML model for the (non-)existence of appropriate entries. The test also succeeds now due to being built against current p2.

@HeikoKlare HeikoKlare marked this pull request as ready for review March 24, 2024 20:07
@laeubi laeubi added the backport-to-tycho-4.0.x Can be added to a PR to trigger an automatic backport of the change label Mar 25, 2024
@laeubi laeubi merged commit d23230d into eclipse-tycho:main Mar 25, 2024
12 checks passed
@laeubi
Copy link
Member

laeubi commented Mar 25, 2024

Perfect, thanks!

@eclipse-tycho-bot
Copy link

💚 All backports created successfully

Status Branch Result
tycho-4.0.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-tycho-4.0.x Can be added to a PR to trigger an automatic backport of the change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants