Skip to content

Commit

Permalink
Run unit tests in build and remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
rautio authored and daveshanley committed Jun 5, 2023
1 parent 8acb233 commit e1c961d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Test
run: go test ./...
- name: Build
run: make build
- name: Clean modcache
Expand All @@ -39,7 +41,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [ 20.x ]
node-version: [20.x]
steps:
- uses: actions/checkout@v3
name: Checkout repository
Expand All @@ -55,4 +57,4 @@ jobs:

- name: Build
run: yarn build
working-directory: ui
working-directory: ui
10 changes: 0 additions & 10 deletions daemon/wiretap_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,14 @@ func extractHeaders(resp *http.Response) map[string]any {

func reconstructURL(r *http.Request, protocol, host, port string) string {
url := fmt.Sprintf("%s://%s", protocol, host)
// pattern := "%s://%s:%s/%s?%s"
// urlString := fmt.Sprintf(pattern, protocol, host, port, r.URL.Path, r.URL.RawQuery)
if port != "" {
url += fmt.Sprintf(":%s", port)
// pattern = "%s://%s/%s?%s"
// urlString = fmt.Sprintf(pattern, protocol, host, r.URL.Path, r.URL.RawQuery)
}
if r.URL.Path != "" {
url += r.URL.Path
}
if r.URL.RawQuery != "" {
url += fmt.Sprintf("?%s", r.URL.RawQuery)
// pattern = "%s://%s:%s/%s"
// urlString = fmt.Sprintf(pattern, protocol, host, port, r.URL.Path)
// if port == "" {
// pattern = "%s://%s/%s"
// urlString = fmt.Sprintf(pattern, protocol, host, r.URL.Path)
// }
}
return url
}
Expand Down

0 comments on commit e1c961d

Please sign in to comment.