Skip to content

Commit 375951f

Browse files
author
Aaron Schlesinger
committed
fix(pkg/gitreceive/storage): make AbsoluteSlugURL point to the right place
previously it was using AbsoluteSlugObjectKey, which caused a repeat of the bucket name and push key prefix
1 parent ada8b78 commit 375951f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/gitreceive/storage/slug_builder_info.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ func (s SlugBuilderInfo) TarKey() string { return s.tarKey }
3838
func (s SlugBuilderInfo) TarURL() string { return s.tarURL }
3939
func (s SlugBuilderInfo) AbsoluteSlugObjectKey() string { return s.PushKey() + "/" + slugTGZName }
4040
func (s SlugBuilderInfo) AbsoluteSlugURL() string {
41-
return s.PushURL() + "/" + s.AbsoluteSlugObjectKey()
41+
return s.PushURL() + "/" + slugTGZName
4242
}

pkg/gitreceive/storage/slug_builder_info_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ func TestAbsoluteSlugURL(t *testing.T) {
7070
sha, err := git.NewSha(rawSha)
7171
assert.NoErr(t, err)
7272
sbi := NewSlugBuilderInfo(s3Endpoint, bucket, appName, slugName, sha)
73-
assert.Equal(t, sbi.AbsoluteSlugURL(), sbi.PushURL()+"/"+sbi.PushKey()+"/"+slugTGZName, "absolute slug URL")
73+
assert.Equal(t, sbi.AbsoluteSlugURL(), sbi.PushURL()+"/"+slugTGZName, "absolute slug URL")
7474
}

0 commit comments

Comments
 (0)