mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
Improve UX when clearing cache due to the stack changing (#442)
* Test that the cache is invalidated when the stack changes * Improve UX when clearing cache due to the stack changing Now outputs a message informing that the cache was cleared, and clears the cache first to avoid a redundant message about removing an old Python version.
This commit is contained in:
@@ -76,6 +76,15 @@ testSmartRequirements() {
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
testStackChange() {
|
||||
local cache_dir="$(mktmpdir)"
|
||||
mkdir -p "${cache_dir}/.heroku"
|
||||
echo "different-stack" > "${cache_dir}/.heroku/python-stack"
|
||||
compile "requirements-standard" "$cache_dir"
|
||||
assertCaptured "clearing cache"
|
||||
assertFile "$STACK" ".heroku/python-stack"
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
|
||||
pushd $(dirname 0) >/dev/null
|
||||
|
||||
Reference in New Issue
Block a user