Skip to content

Commit

Permalink
Merge branch 'main' into feature/issue-#9198
Browse files Browse the repository at this point in the history
  • Loading branch information
hongalex committed Apr 27, 2024
2 parents c480482 + 31558c7 commit 9e08813
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-go:latest
digest: sha256:5344e4bc9209d857c203a5663ed193cb5b21ccd6f1eeebba8cafd08e99953863
digest: sha256:c276bbd700aa980f20b52e1c869ceb227899fad24b6f12a7e0e52ea189fcb1e7
2 changes: 2 additions & 0 deletions go.work.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cloud.google.com/go/auth v0.2.0/go.mod h1:+yb+oy3/P0geX6DLKlqiGHARGR6EX2GRtYCzWOCQSbU=
cloud.google.com/go/auth/oauth2adapt v0.2.0/go.mod h1:AfqujpDAlTfLfeCIl/HJZZlIxD8+nJoZ5e0x1IxGq5k=
cloud.google.com/go/dataproc v1.12.0 h1:W47qHL3W4BPkAIbk4SWmIERwsWBaNnWm0P2sdx3YgGU=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.46.0/go.mod h1:V28hx+cUCZC9e3qcqszMb+Sbt8cQZtHTiXOmyDzoDOg=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
Expand Down
2 changes: 1 addition & 1 deletion internal/gapicgen/git/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"time"

"cloud.google.com/go/internal/gapicgen/execv"
"github.com/google/go-github/v60/github"
"github.com/google/go-github/v59/github"
"golang.org/x/oauth2"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/gapicgen/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/go-git/go-git/v5 v5.12.0
github.com/google/go-github/v60 v60.0.0
github.com/google/go-github/v59 v59.0.0
golang.org/x/oauth2 v0.19.0
golang.org/x/sync v0.7.0
)
Expand Down
4 changes: 2 additions & 2 deletions internal/gapicgen/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-github/v60 v60.0.0 h1:oLG98PsLauFvvu4D/YPxq374jhSxFYdzQGNCyONLfn8=
github.com/google/go-github/v60 v60.0.0/go.mod h1:ByhX2dP9XT9o/ll2yXAu2VD8l5eNVg8hD4Cr0S/LmQk=
github.com/google/go-github/v59 v59.0.0 h1:7h6bgpF5as0YQLLkEiVqpgtJqjimMYhBkD4jT5aN3VA=
github.com/google/go-github/v59 v59.0.0/go.mod h1:rJU4R0rQHFVFDOkqGWxfLNo6vEk4dv40oDjhV/gH6wM=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
Expand Down
2 changes: 1 addition & 1 deletion internal/postprocessor/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.20
require (
github.com/go-git/go-git/v5 v5.12.0
github.com/google/go-cmp v0.6.0
github.com/google/go-github/v60 v60.0.0
github.com/google/go-github/v59 v59.0.0
gopkg.in/yaml.v3 v3.0.1
)

Expand Down
4 changes: 2 additions & 2 deletions internal/postprocessor/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4er
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-github/v60 v60.0.0 h1:oLG98PsLauFvvu4D/YPxq374jhSxFYdzQGNCyONLfn8=
github.com/google/go-github/v60 v60.0.0/go.mod h1:ByhX2dP9XT9o/ll2yXAu2VD8l5eNVg8hD4Cr0S/LmQk=
github.com/google/go-github/v59 v59.0.0 h1:7h6bgpF5as0YQLLkEiVqpgtJqjimMYhBkD4jT5aN3VA=
github.com/google/go-github/v59 v59.0.0/go.mod h1:rJU4R0rQHFVFDOkqGWxfLNo6vEk4dv40oDjhV/gH6wM=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
Expand Down
2 changes: 1 addition & 1 deletion internal/postprocessor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"time"

"cloud.google.com/go/internal/postprocessor/execv/gocmd"
"github.com/google/go-github/v60/github"
"github.com/google/go-github/v59/github"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion storage/bucket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1595,7 +1595,7 @@ func TestBucketSignedURL_Endpoint_Emulator_Host(t *testing.T) {

var opts []option.ClientOption
if test.endpoint != nil {
opts = append(opts, option.WithEndpoint(*test.endpoint))
opts = append(opts, option.WithEndpoint(*test.endpoint), option.WithoutAuthentication())
}
c, err := NewClient(context.Background(), opts...)
if err != nil {
Expand Down
15 changes: 15 additions & 0 deletions storage/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5385,6 +5385,11 @@ func TestIntegration_Scopes(t *testing.T) {
}

func TestIntegration_SignedURL_WithCreds(t *testing.T) {
// Skip before getting creds if running with -short
if testing.Short() {
t.Skip("Integration tests skipped in short mode")
}

ctx := context.Background()

creds, err := findTestCredentials(ctx, "GCLOUD_TESTS_GOLANG_KEY", ScopeFullControl, "https://www.googleapis.com/auth/cloud-platform")
Expand Down Expand Up @@ -5416,6 +5421,11 @@ func TestIntegration_SignedURL_WithCreds(t *testing.T) {
}

func TestIntegration_SignedURL_DefaultSignBytes(t *testing.T) {
// Skip before getting creds if running with -short
if testing.Short() {
t.Skip("Integration tests skipped in short mode")
}

ctx := context.Background()

// Create another client to test the sign byte function as well
Expand Down Expand Up @@ -5456,6 +5466,11 @@ func TestIntegration_SignedURL_DefaultSignBytes(t *testing.T) {
}

func TestIntegration_PostPolicyV4_WithCreds(t *testing.T) {
// Skip before getting creds if running with -short
if testing.Short() {
t.Skip("Integration tests skipped in short mode")
}

// By default we are authed with a token source, so don't have the context to
// read some of the fields from the keyfile.
// Here we explictly send the key to the client.
Expand Down
7 changes: 7 additions & 0 deletions storage/invoke_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ import (
"regexp"
"strings"
"testing"
"time"

"github.com/googleapis/gax-go/v2"
"github.com/googleapis/gax-go/v2/callctx"
"golang.org/x/xerrors"
"google.golang.org/api/googleapi"
Expand Down Expand Up @@ -250,6 +252,11 @@ func TestInvoke(t *testing.T) {
}
return test.finalErr
}
// Use a short backoff to speed up the test.
if test.retry == nil {
test.retry = defaultRetry.clone()
}
test.retry.backoff = &gax.Backoff{Initial: time.Millisecond}
got := run(ctx, call, test.retry, test.isIdempotentValue)
if test.expectFinalErr && !errors.Is(got, test.finalErr) {
s.Errorf("got %v, want %v", got, test.finalErr)
Expand Down
6 changes: 3 additions & 3 deletions storage/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ func TestClientSetRetry(t *testing.T) {
}
for _, tc := range testCases {
t.Run(tc.name, func(s *testing.T) {
c, err := NewClient(context.Background())
c, err := NewClient(context.Background(), option.WithoutAuthentication())
if err != nil {
t.Fatalf("NewClient: %v", err)
}
Expand Down Expand Up @@ -1358,7 +1358,7 @@ func TestRetryer(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.name, func(s *testing.T) {
ctx := context.Background()
c, err := NewClient(ctx)
c, err := NewClient(ctx, option.WithoutAuthentication())
if err != nil {
t.Fatalf("NewClient: %v", err)
}
Expand Down Expand Up @@ -2151,7 +2151,7 @@ func TestWithEndpoint(t *testing.T) {
ctx := context.Background()
for _, tc := range testCases {
os.Setenv("STORAGE_EMULATOR_HOST", tc.StorageEmulatorHost)
c, err := NewClient(ctx, option.WithEndpoint(tc.CustomEndpoint))
c, err := NewClient(ctx, option.WithEndpoint(tc.CustomEndpoint), option.WithoutAuthentication())
if err != nil {
t.Fatalf("error creating client: %v", err)
}
Expand Down

0 comments on commit 9e08813

Please sign in to comment.