Commit 6e862f9
Fix cache-key test on release branches (#58546)
Summary:
Pull Request resolved: #58546
`getCacheKey` only hashes package contents when the package version ends in
`-main`; published releases short-circuit and return the version string. The
test asserted only the main-build property, so it could never pass on a release
branch, where two calls with different package contents both return the version.
The test now asserts the property that actually holds for each case: differing
keys on main builds, and the version string on published releases. This also
adds coverage for the published-release path, which previously had none.
Changelog: [Internal]
___
Differential Revision: D120209439
fbshipit-source-id: 9ebe74bad70ffca7bc7eb8b61fa8020b56219e8f1 parent 7a2963f commit 6e862f9
1 file changed
Lines changed: 16 additions & 5 deletions
Lines changed: 16 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
0 commit comments