Add Unit Test for artifact caching
Review Request #3284 - Created Dec. 30, 2015 and submitted
|jsirois, mateor, stuhood, zundel|
Add Unit Test for artifact caching to replace test_scalastyle_cached in test_scalastyle_integration.py, and test_checkstyle_cached in test_checkstyle_integration.py.
CI is running: https://travis-ci.org/pantsbuild/pants/builds/99372283
removed test_scalastyle_cached and test_checkstyle_cached
Revision 2 (+97 -66)
What do you think about adding a second assert that shows that the targets still have the same fingeprint? I looked for, but did not find, a smoke test for fingerprint drift after multiple runs.
By definition, a cache hit means that they have the same fingerprint. But it would be simple to add an additional line here that proves that the invalid_vts2 list is empty because they have the same fingerprint and not for some other reason. It would also add a sanity check that the fingerprint is not changed anywhere along the way.
I am thinking along the lines of
self.assertEqual(all_vts.cache_key.hash, all_vts2.cache_key.hash)or something?