mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
Add Hatchet test
This commit is contained in:
@@ -1,10 +1,28 @@
|
||||
require_relative '../spec_helper'
|
||||
|
||||
describe "Python!!!!!!!!!!!" do
|
||||
describe "Default Python Deploy" do
|
||||
it "🐍" do
|
||||
Hatchet::Runner.new('python-getting-started', stack: DEFAULT_STACK).deploy do |app|
|
||||
expect(app.output).to match(/Installing pip/)
|
||||
expect(app.run('python -V')).to match(/3.6.10/)
|
||||
|
||||
|
||||
expect(app.output).to_not match("Clearing cached dependencies")
|
||||
|
||||
# Redeploy
|
||||
run!(%Q{echo "flask" >> requirements.txt})
|
||||
run!(%Q{git add . ; git commit --allow-empty -m next})
|
||||
app.push!
|
||||
|
||||
# Check for the cache tohave cleared
|
||||
expect(app.output).to match("Clearing cached dependencies")
|
||||
|
||||
run!(%Q{git commit --allow-empty -m next})
|
||||
app.push!
|
||||
|
||||
# The cache should not clear with no changes
|
||||
expect(app.output).to_not match("Clearing cached dependencies")
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+7
-1
@@ -20,4 +20,10 @@ if ENV['TRAVIS']
|
||||
exit 0 if ENV['TRAVIS_PULL_REQUEST'] != 'false' && ENV['TRAVIS_BRANCH'] == 'master'
|
||||
end
|
||||
|
||||
DEFAULT_STACK = 'heroku-16'
|
||||
DEFAULT_STACK = 'heroku-18'
|
||||
|
||||
def run!(cmd)
|
||||
out = `#{cmd}`
|
||||
raise "Error running command #{cmd} with output: #{out}" unless $?.success?
|
||||
return out
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user