Skip to content

Commit

Permalink
fix: incorect zip file
Browse files Browse the repository at this point in the history
  • Loading branch information
clement2026 committed Sep 6, 2024
1 parent 59e2151 commit 06ecdc1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,6 @@ copy:
cp -r ts/out assets/web/html

zip:
zip -r assets/web/html.zip ts/out/*
rm assets/web/html.zip
# this won't work as it creates ts/out entry in the .zip: zip -r assets/web/html.zip ts/out/*
cd ts/out && zip -r ../../assets/web/html.zip ./*
Binary file modified assets/web/html.zip
Binary file not shown.
12 changes: 11 additions & 1 deletion tests/e2e/run_binary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/stretchr/testify/assert"
)

//goland:noinspection HttpUrlsUsage
func TestRunBinary(t *testing.T) {

binary, err := FindBinary(t)
Expand All @@ -32,7 +33,6 @@ func TestRunBinary(t *testing.T) {
assert.True(t, LogContainsText(c.Status(), "listening on localhost:12345") ||
LogContainsText(c.Status(), "listening on 127.0.0.1:12345"), WhatsWrong(c.Status()))

//goland:noinspection HttpUrlsUsage
url := fmt.Sprintf("http://%s:%d", host, port)

Test(t,
Expand All @@ -41,4 +41,14 @@ func TestRunBinary(t *testing.T) {
Expect().Status().Equal(http.StatusOK),
Expect().Body().String().Contains("Live pprof"),
)

url = fmt.Sprintf("http://%s:%d/favicon.ico", host, port)

Test(t,
Description("Get favicon.ico: "+url),
Get(url),
Expect().Status().Equal(http.StatusOK),
Expect().Headers("content-type").Equal("image/x-icon"),
Expect().Body().Bytes().Len().GreaterThan(0),
)
}

0 comments on commit 06ecdc1

Please sign in to comment.