Add jar Publish integration tests to test the generated pom and ivy.xml files.

Review Request #1879 — Created March 6, 2015 and submitted

areitz, ity, jsirois, stuhood

Add test to jar publish to test the contents of generated pom file and ivy.xml file

This is in preparation to change JarPublish task to publish extra products as a separate artifact with its own pom

You will seeing a patch and tests for the same soon.

More context here->!search/Proposal$3A$20Make$20JarPublish$20task$20more$20configurable./pants-devel/S5l2_NXBtnw/Mf1pLj7P-kgJ



./pants test.pytest tests/python/pants_test/tasks:jar_publish_integration is green

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
  1. Thanks for doing this, it mostly looks good to me. The resources thing is a nit (and totally optional), but I'd like to see if you can use assertEqual or assertMultilineEqual when comparing the templates -- I think that will give a better error message.

    Alternatively, you can show the error message that results in a mis-match w/ your current code. If that makes it obvious what's wrong, then I'm cool with it.

  2. It seems like it should be possible to tag the resource dir on the python_tests() target in the BUILD file:

    But I'm not seeing an example of how to access the resources from the python side. I see some stuff in the science repo, but I'm not sure if they're actually using the resource dir supplied by pants.

    1. The consumer of a python_library needs to use pkgutil to extract resources file from a pex.

      Pytest runner is not aware of resources like junit runner. It would make sense to add resources only if they are pary of test library.

  3. I think if you used something like assertMultilineEqual():

    Then we'd get nice error messages in the future, when we change the template but forget to change the test. My understanding is that it will give you a visual diff, highlighting what part of the golden template that needs to be changed.

    1. Sure will do. That surely is helpful.

  1. Looks awesome, thanks!

  1. looks good!

Review request changed

Status: Closed (submitted)

Change Summary:

Submitted here 490cef6860637f25ecc21891865034f6d0da299d