Skip to content

Commit

Permalink
Merge pull request #16680 from rifelpet/aws-token-utc
Browse files Browse the repository at this point in the history
Use UTC for AWS token tests
  • Loading branch information
k8s-ci-robot authored Jul 18, 2024
2 parents ae8fa06 + b4dc7e9 commit 8fb8c56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions upup/pkg/fi/cloudup/awsup/aws_authenticator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func TestCreateTokenV1(t *testing.T) {
}
t.Logf("decoded: %+v", decoded)

signatureDate := time.Now().Format("20060102") // This might fail if we cross midnight, it seems very unlikely
signatureDate := time.Now().UTC().Format("20060102")

amzSignature := ""
amzSignedHeaders := ""
Expand Down Expand Up @@ -269,7 +269,7 @@ func TestCreateTokenV2(t *testing.T) {
t.Errorf("unexpected http method: got %q, want %q", decoded.Method, want)
}

signatureDate := time.Now().Format("20060102") // This might fail if we cross midnight, it seems very unlikely
signatureDate := time.Now().UTC().Format("20060102")

amzSignature := ""
amzSignedHeaders := ""
Expand Down

0 comments on commit 8fb8c56

Please sign in to comment.