diff --git a/pkg/api/server/v1alpha2/log/gcs_test.go b/pkg/api/server/v1alpha2/log/gcs_test.go index 87d64df3b..4f9423964 100644 --- a/pkg/api/server/v1alpha2/log/gcs_test.go +++ b/pkg/api/server/v1alpha2/log/gcs_test.go @@ -79,6 +79,7 @@ func NewRecordReplayClient(t *testing.T, modReq func(r *httpreplay.Recorder), po if err != nil { t.Fatal(err) } + rep.IgnoreHeader("X-Goog-Gcs-Idempotency-Token") recState := new(time.Time) if err := recState.UnmarshalBinary(rep.Initial()); err != nil { @@ -98,7 +99,6 @@ func NewTestGCPClient(ctx context.Context, port int, t *testing.T) (client *gcp. r.ClearQueryParams("Signature") r.ClearHeaders("Expires") r.ClearHeaders("Signature") - r.ClearHeaders("X-Goog-Gcs-Idempotency-Token") r.ClearHeaders("User-Agent") }, port) if *Record { @@ -142,7 +142,7 @@ func TestGCSWriteTo(t *testing.T) { }, key: gcsTestKey, } - client, done := NewTestGCPClient(ctx, 8081, t) + client, done := NewTestGCPClient(ctx, 8082, t) defer done() gcs.client = client var w bytes.Buffer diff --git a/pkg/api/server/v1alpha2/log/s3.go b/pkg/api/server/v1alpha2/log/s3.go index f7ad71563..e051daae4 100644 --- a/pkg/api/server/v1alpha2/log/s3.go +++ b/pkg/api/server/v1alpha2/log/s3.go @@ -107,17 +107,17 @@ func initConfig(ctx context.Context, cfg *server.Config) (*s3.Client, error) { var awsConfig aws.Config var err error if len(cfg.S3_ENDPOINT) > 0 { - customResolver := aws.EndpointResolverWithOptionsFunc(func(_, region string, _ ...any) (aws.Endpoint, error) { + customResolver := aws.EndpointResolverWithOptionsFunc(func(_, region string, _ ...any) (aws.Endpoint, error) { //nolint:staticcheck if region == cfg.S3_REGION { - return aws.Endpoint{ + return aws.Endpoint{ //nolint:staticcheck URL: cfg.S3_ENDPOINT, SigningRegion: cfg.S3_REGION, HostnameImmutable: cfg.S3_HOSTNAME_IMMUTABLE, }, nil } - return aws.Endpoint{}, &aws.EndpointNotFoundError{} + return aws.Endpoint{}, &aws.EndpointNotFoundError{} //nolint:staticcheck }) - awsConfig, err = config.LoadDefaultConfig(ctx, config.WithRegion(cfg.S3_REGION), credentialsOpt, config.WithEndpointResolverWithOptions(customResolver)) + awsConfig, err = config.LoadDefaultConfig(ctx, config.WithRegion(cfg.S3_REGION), credentialsOpt, config.WithEndpointResolverWithOptions(customResolver)) //nolint:staticcheck } else { awsConfig, err = config.LoadDefaultConfig(ctx, config.WithRegion(cfg.S3_REGION), credentialsOpt) } diff --git a/pkg/api/server/v1alpha2/log/testdata/TestGCSDelete.replay b/pkg/api/server/v1alpha2/log/testdata/TestGCSDelete.replay index 947eab63e..a685360ff 100644 --- a/pkg/api/server/v1alpha2/log/testdata/TestGCSDelete.replay +++ b/pkg/api/server/v1alpha2/log/testdata/TestGCSDelete.replay @@ -7,7 +7,6 @@ "^X-Goog-.*Encryption-Key$", "^Expires$", "^Signature$", - "^X-Goog-Gcs-Idempotency-Token$", "^User-Agent$" ], "RemoveRequestHeaders": [ @@ -47,9 +46,6 @@ ], "User-Agent": [ "CLEARED" - ], - "X-Goog-Gcs-Idempotency-Token": [ - "CLEARED" ] }, "MediaType": "", diff --git a/pkg/api/server/v1alpha2/log/testdata/TestGCSReadFrom.replay b/pkg/api/server/v1alpha2/log/testdata/TestGCSReadFrom.replay index 799035f4f..2861622d6 100644 --- a/pkg/api/server/v1alpha2/log/testdata/TestGCSReadFrom.replay +++ b/pkg/api/server/v1alpha2/log/testdata/TestGCSReadFrom.replay @@ -7,7 +7,6 @@ "^X-Goog-.*Encryption-Key$", "^Expires$", "^Signature$", - "^X-Goog-Gcs-Idempotency-Token$", "^User-Agent$" ], "RemoveRequestHeaders": [ diff --git a/pkg/api/server/v1alpha2/log/testdata/TestGCSWriteTo.replay b/pkg/api/server/v1alpha2/log/testdata/TestGCSWriteTo.replay index f3a0ce321..48593ca53 100644 --- a/pkg/api/server/v1alpha2/log/testdata/TestGCSWriteTo.replay +++ b/pkg/api/server/v1alpha2/log/testdata/TestGCSWriteTo.replay @@ -7,7 +7,6 @@ "^X-Goog-.*Encryption-Key$", "^Expires$", "^Signature$", - "^X-Goog-Gcs-Idempotency-Token$", "^User-Agent$" ], "RemoveRequestHeaders": [