Skip to content

Commit

Permalink
chore: fix test pipeline (#5)
Browse files Browse the repository at this point in the history
* chore: test action

* chore: add url string

* chore: read header

* chore: more log

* chore: don't use ubuntu latest as mongodb haven't support it
  • Loading branch information
vinhphuctadang authored and saniales committed Jan 19, 2023
1 parent 11cf299 commit c4c97da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
go_version: [1.17, 1.18, 1.19]
os: [ubuntu-latest, macOS-latest]
os: [ubuntu-20.04, macOS-latest]
steps:
- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v3
Expand Down
4 changes: 1 addition & 3 deletions mongobin/getOrDownload.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,10 @@ func GetOrDownloadMongod(urlStr string, cachePath string, logger *memongolog.Log
// Extract mongod
gzReader, gzErr := gzip.NewReader(tgzTempFile)
if gzErr != nil {
return "", fmt.Errorf("error intializing gzip reader from %s: %s", tgzTempFile.Name(), gzErr)
return "", fmt.Errorf("error intializing gzip reader from %s: %w, %s", tgzTempFile.Name(), gzErr, urlStr)
}

tarReader := tar.NewReader(gzReader)

for {
nextFile, tarErr := tarReader.Next()
if tarErr == io.EOF {
Expand All @@ -104,7 +103,6 @@ func GetOrDownloadMongod(urlStr string, cachePath string, logger *memongolog.Log
if err != nil {
return "", err
}

break
}
}
Expand Down

0 comments on commit c4c97da

Please sign in to comment.