File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7474 end
7575 end
7676
77+ it "Purges cache when stack changes" do
78+ Hatchet ::Runner . new ( "ruby_no_rails_test" , stack : "heroku-24" ) . tap do |app |
79+ app . before_deploy do
80+ Pathname ( "app.json" ) . write ( <<~EOF )
81+ { "stack": "heroku-24" }
82+ EOF
83+ end
84+
85+ app . run_ci do |test_run |
86+ expect ( test_run . output ) . to include ( "Fetching rake" )
87+ expect ( test_run . output ) . to_not include ( "Purging Cache" )
88+
89+ # Change stack from heroku-24 to heroku-22
90+ Pathname ( "app.json" ) . write ( <<~EOF )
91+ { "stack": "heroku-22" }
92+ EOF
93+ run! ( "git add app.json && git commit -m 'Change stack to heroku-22'" )
94+
95+ test_run . run_again
96+
97+ expect ( test_run . output ) . to include ( "Purging Cache. Changing stack from heroku-24 to heroku-22" )
98+ end
99+ end
100+ end
101+
77102 it "CI build time config var behavior" do
78103 script = "echo '## PRINTING ENV ##' && env | sort && echo '## PRINTING ENV DONE ##'; echo '## PRINTING BIN ## ' && ls -1 ./bin | sort && echo '## PRINTING BIN DONE ##'"
79104
You can’t perform that action at this time.
0 commit comments