Skip to content

Commit fef99f8

Browse files
committed
Restore & revive test fixtures for app builds
1 parent c961e41 commit fef99f8

File tree

15 files changed

+26
-14
lines changed

15 files changed

+26
-14
lines changed

heroku/resource_heroku_build_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ func TestAccHerokuBuild_LocalSourceTarball(t *testing.T) {
114114
// Manually generated using `shasum --algorithm 256 app.tgz`
115115
// Manually generated using `shasum --algorithm 256 app-2.tgz`
116116
// per Heroku docs https://devcenter.heroku.com/articles/slug-checksums
117-
sourceChecksum := "SHA256:ec6f7070fd416adde60b3c26a181d6cca80e7acad0c07e507a1e55f7ce2c4f3f"
118-
sourceChecksum2 := "SHA256:b9f442aa243e56aac986522324a9028873bcc49448586d7624839207e592feda"
117+
sourceChecksum := "SHA256:da57c23d767c971b383de3bf1a680e5ea0f3991f4738552cb383127e60864b20"
118+
sourceChecksum2 := "SHA256:483332872ad9112337b5790da1406c8b3cdcf07d53d04c953d9e17d3e63fb522"
119119

120120
defer resetSourceFiles()
121121

@@ -331,7 +331,7 @@ resource "heroku_build" "foobar" {
331331
"https://github.com/heroku/heroku-buildpack-ruby",
332332
]
333333
source {
334-
checksum = "SHA256:ec6f7070fd416adde60b3c26a181d6cca80e7acad0c07e507a1e55f7ce2c4f3f"
334+
checksum = "SHA256:da57c23d767c971b383de3bf1a680e5ea0f3991f4738552cb383127e60864b20"
335335
url = "https://github.com/heroku/terraform-provider-heroku/raw/update-heroku-api-client/heroku/test-fixtures/app.tgz"
336336
version = "v0"
337337
}

heroku/test-fixtures/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ In `heroku/test-fixtures/`, directories like `app/`, `app-2/`, & `app-broken-bui
99
When the app dirs are changed, their associated `*.tgz` archives should be remade with:
1010
```
1111
cd heroku/test-fixtures/
12-
tar -czf app.tgz app
13-
tar -czf app-2.tgz app-2
14-
tar -czf app-broken-build.tgz app-broken-build
12+
tar -czf app.tgz app/*
13+
tar -czf app-2.tgz app-2/*
14+
tar -czf app-broken-build.tgz app-broken-build/*
1515
```
1616

1717
Then, the **checksums** of these tarballs must be manually computed and updated throughout `heroku/resource_heroku_build_test.go`.

heroku/test-fixtures/app-2.tgz

97 Bytes
Binary file not shown.

heroku/test-fixtures/app-2/Gemfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# frozen_string_literal: true
22

33
source "https://rubygems.org"
4+
ruby "3.4.4"
45

5-
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
6-
7-
# gem "rails"
6+
gem "webrick", "~> 1.9"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4+
webrick (1.9.1)
45

56
PLATFORMS
67
ruby
78

89
DEPENDENCIES
10+
webrick (~> 1.9)
11+
12+
RUBY VERSION
13+
ruby 3.4.4
914

1015
BUNDLED WITH
1116
2.6.9
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: bundle exec ruby server.rb
63 Bytes
Binary file not shown.

heroku/test-fixtures/app-broken-build/Gemfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@
44

55
source "https://non-existent-rubygems.example.org"
66

7-
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
8-
97
# gem "rails"

heroku/test-fixtures/app-broken-build/Gemfile.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ GEM
22
remote: https://rubygems.org/
33
specs:
44

5+
RUBY VERSION
6+
ruby 3.4.4
7+
58
PLATFORMS
69
ruby
710

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: bundle exec ruby server.rb

0 commit comments

Comments
 (0)