Skip to content

Commit

Permalink
fix: integration test for appsync apikey auth fails with out of bound…
Browse files Browse the repository at this point in the history
… API key expiration (backport #21198) (#21204)

This is an automatic backport of pull request #21198 done by [Mergify](https://mergify.com).
Cherry-pick of 37a44d7 has failed:
```
On branch mergify/bp/v1-main/pr-21198
Your branch is up to date with 'origin/v1-main'.

You are currently cherry-picking commit 37a44d7.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json
	modified:   packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/cdk.out
	modified:   packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/manifest.json
	modified:   packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.ts

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json
	both modified:   packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json

```


To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

---


<details>
<summary>Mergify commands and options</summary>

<br />

More conditions and actions can be found in the [documentation](https://docs.mergify.com/).

You can also trigger Mergify actions by commenting on this pull request:

- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport <destination>` will backport this PR on `<destination>` branch

Additionally, on Mergify [dashboard](https://dashboard.mergify.com/) you can:

- look at your merge queues
- generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com
</details>
  • Loading branch information
mergify[bot] authored Jul 18, 2022
1 parent 3d4f45c commit 0134d87
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "20.0.0",
"files": {
"edb3fd1d912b400f4857c41a3ff80bcc32d180595affcd6c017f72afd5959482": {
"source": {
"path": "aws-appsync-integ.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "edb3fd1d912b400f4857c41a3ff80bcc32d180595affcd6c017f72afd5959482.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
}
},
"dockerImages": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
"ApiF70053CD",
"ApiId"
]
},
"Expires": 1658053715
}
},
"DependsOn": [
"ApiSchema510EECD7"
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"17.0.0"}
{"version":"20.0.0"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "17.0.0",
"version": "20.0.0",
"artifacts": {
"Tree": {
"type": "cdk:tree",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@
"ApiF70053CD",
"ApiId"
]
},
"expires": 1658053715
}
}
},
"constructInfo": {
Expand Down Expand Up @@ -349,4 +348,4 @@
"version": "0.0.0"
}
}
}
}
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-appsync/test/integ.auth-apikey.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { join } from 'path';
import { AttributeType, BillingMode, Table } from '@aws-cdk/aws-dynamodb';
import { App, RemovalPolicy, Stack, Expiration } from '@aws-cdk/core';
import { App, RemovalPolicy, Stack } from '@aws-cdk/core';
import { AuthorizationType, GraphqlApi, MappingTemplate, PrimaryKey, Schema, Values } from '../lib';

/*
Expand Down Expand Up @@ -28,8 +28,8 @@ const api = new GraphqlApi(stack, 'Api', {
defaultAuthorization: {
authorizationType: AuthorizationType.API_KEY,
apiKeyConfig: {
// Generate a timestamp that's 365 days ahead, use atTimestamp so integ test doesn't fail
expires: Expiration.atTimestamp(1658053715000),
// Rely on default expiration date provided by the API so we have a deterministic snapshot
expires: undefined,
},
},
},
Expand Down

0 comments on commit 0134d87

Please sign in to comment.