From 9350267a00330c2c4a229f3bb979ac20c8a63f2a Mon Sep 17 00:00:00 2001 From: Ulysse Corbeil Date: Wed, 3 Jun 2026 15:19:38 -0400 Subject: [PATCH 1/3] change profile url --- s3store.go | 4 ++++ s3store_test.go | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/s3store.go b/s3store.go index 9a2106a..9f986c5 100644 --- a/s3store.go +++ b/s3store.go @@ -258,6 +258,10 @@ func ParseS3URL(s3URL *url.URL) (configOptions []func(*awsconfig.LoadOptions) er )) } + if profile := s3URL.Query().Get("profile"); profile != "" { + configOptions = append(configOptions, awsconfig.WithSharedConfigProfile(profile)) + } + return configOptions, bucket, strings.Trim(path, "/"), getStorageClass(s3URL.Query()), nil } diff --git a/s3store_test.go b/s3store_test.go index 0e4bdb7..ff2e296 100644 --- a/s3store_test.go +++ b/s3store_test.go @@ -91,3 +91,15 @@ func TestParseS3URL(t *testing.T) { }) } } + +func TestParseS3URL_Profile(t *testing.T) { + baseURL, err := url.Parse("s3://s3.example.com/my-bucket?region=us-east-1&profile=myprofile") + require.NoError(t, err) + + configOptions, bucket, path, _, err := ParseS3URL(baseURL) + require.NoError(t, err) + assert.Equal(t, "my-bucket", bucket) + assert.Equal(t, "", path) + // profile adds one extra config option (region + endpoint + profile = 3) + assert.Equal(t, 3, len(configOptions)) +} From 8997e84165707cc26e3a6a0a73b260cced9bba57 Mon Sep 17 00:00:00 2001 From: Ulysse Corbeil Date: Mon, 8 Jun 2026 16:31:17 -0400 Subject: [PATCH 2/3] add simple go test --- .github/workflows/go-test.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/go-test.yml diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml new file mode 100644 index 0000000..5aece44 --- /dev/null +++ b/.github/workflows/go-test.yml @@ -0,0 +1,15 @@ +name: Go Test + +on: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + - name: Run tests + run: go test ./... From ca5c22d16d4a9d7c1e283d8d2ac935dd63592f5f Mon Sep 17 00:00:00 2001 From: Ulysse Corbeil Date: Mon, 8 Jun 2026 16:32:33 -0400 Subject: [PATCH 3/3] add branch and build --- .github/workflows/go-test.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 5aece44..2a31c6e 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -2,6 +2,9 @@ name: Go Test on: pull_request: + push: + branches: + - develop jobs: test: @@ -11,5 +14,7 @@ jobs: - uses: actions/setup-go@v5 with: go-version-file: go.mod - - name: Run tests + - name: Test run: go test ./... + - name: Build + run: go build ./...