-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve the reported errors so that consumers can understand why failure occurs. This is vital for credential lookup failures, which is impossible to debug otherwise, for example permission error when using gcloud as credentials helper as identified debugging an issue in testcontainers. Eliminate wrapping errors with "error ..." as that results in messages which are hard to understand in a multi wrap. Add tests to cover credentials helper, ensuring that command handling behaves correctly. Modernise error checks to use errors.Is. Leverage doc comment reference linking instead of backticks. Use Auth fallback if credentials store reports not found. Remove impossible decode length check and ensure decoded data is sized correctly, eliminating need for \x00 trim. Add github action to run test and lint. Fix from base64 auth tests not running due to missing parameter. Fix some comment typos.
- Loading branch information
Showing
6 changed files
with
332 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This workflow will build a golang project | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | ||
|
||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
env: | ||
GO_VERSION: "1.23" | ||
GOLANGCI_VERSION: "v1.59.1" | ||
|
||
jobs: | ||
lint-test-go: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: Validate go mod tidy | ||
run: | | ||
go mod tidy | ||
git --no-pager diff && [[ 0 -eq $(git status --porcelain | wc -l) ]] | ||
- name: Go Lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: ${{ env.GOLANGCI_VERSION }} | ||
args: --out-format=colored-line-number | ||
|
||
- name: Test | ||
run: go test -race ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.