From 0561992e981f250efc132414bd263d467668042e Mon Sep 17 00:00:00 2001 From: Aayush Thapa Date: Fri, 8 Nov 2024 19:43:51 -0500 Subject: [PATCH] fix graph ql tests --- .../translator/input/graphqlapi_cognito_default_auth.yaml | 2 +- tests/translator/input/graphqlapi_function_by_id.yaml | 2 +- .../graphqlapi_multiple_none_datasource_functions.yaml | 8 ++++---- ...aphqlapi_resolver_function_with_lambda_datasource.yaml | 2 +- .../output/aws-cn/graphqlapi_cognito_default_auth.json | 2 +- .../output/aws-cn/graphqlapi_function_by_id.json | 2 +- .../graphqlapi_multiple_none_datasource_functions.json | 8 ++++---- ...aphqlapi_resolver_function_with_lambda_datasource.json | 2 +- .../aws-us-gov/graphqlapi_cognito_default_auth.json | 2 +- .../output/aws-us-gov/graphqlapi_function_by_id.json | 2 +- .../graphqlapi_multiple_none_datasource_functions.json | 8 ++++---- ...aphqlapi_resolver_function_with_lambda_datasource.json | 2 +- .../output/graphqlapi_cognito_default_auth.json | 2 +- tests/translator/output/graphqlapi_function_by_id.json | 2 +- .../graphqlapi_multiple_none_datasource_functions.json | 8 ++++---- ...aphqlapi_resolver_function_with_lambda_datasource.json | 2 +- 16 files changed, 28 insertions(+), 28 deletions(-) diff --git a/tests/translator/input/graphqlapi_cognito_default_auth.yaml b/tests/translator/input/graphqlapi_cognito_default_auth.yaml index 7754ffa96..9078f87f7 100644 --- a/tests/translator/input/graphqlapi_cognito_default_auth.yaml +++ b/tests/translator/input/graphqlapi_cognito_default_auth.yaml @@ -16,7 +16,7 @@ Resources: AppIdClientRegex: myregex AwsRegion: na-east-1 # This default action will exist post transform since this is our default authentication. - DefaultAction: something + DefaultAction: ALLOW UserPoolId: myid Tags: key1: value1 diff --git a/tests/translator/input/graphqlapi_function_by_id.yaml b/tests/translator/input/graphqlapi_function_by_id.yaml index 6c45cc637..d089338e6 100644 --- a/tests/translator/input/graphqlapi_function_by_id.yaml +++ b/tests/translator/input/graphqlapi_function_by_id.yaml @@ -22,5 +22,5 @@ Resources: DataSourceName: some-cool-datasource Name: MyFunction Runtime: - Name: some-runtime + Name: APPSYNC_JS RuntimeVersion: 1.2.3 diff --git a/tests/translator/input/graphqlapi_multiple_none_datasource_functions.yaml b/tests/translator/input/graphqlapi_multiple_none_datasource_functions.yaml index f71751ecc..a711ffd00 100644 --- a/tests/translator/input/graphqlapi_multiple_none_datasource_functions.yaml +++ b/tests/translator/input/graphqlapi_multiple_none_datasource_functions.yaml @@ -15,23 +15,23 @@ Resources: CodeUri: my-code-uri DataSource: NONE Runtime: - Name: some-runtime + Name: APPSYNC_JS Version: 1.2.3 AnotherFunction: CodeUri: my-code-uri DataSource: None Runtime: - Name: some-runtime + Name: APPSYNC_JS Version: 1.2.3 SimilarFunction: CodeUri: my-code-uri DataSource: none Runtime: - Name: some-runtime + Name: APPSYNC_JS Version: 1.2.3 GoodFunction: CodeUri: my-code-uri DataSource: nOnE Runtime: - Name: some-runtime + Name: APPSYNC_JS Version: 1.2.3 diff --git a/tests/translator/input/graphqlapi_resolver_function_with_lambda_datasource.yaml b/tests/translator/input/graphqlapi_resolver_function_with_lambda_datasource.yaml index eff5425cc..98a77993e 100644 --- a/tests/translator/input/graphqlapi_resolver_function_with_lambda_datasource.yaml +++ b/tests/translator/input/graphqlapi_resolver_function_with_lambda_datasource.yaml @@ -50,7 +50,7 @@ Resources: Functions: MyFunction: Runtime: - Name: some-runtime + Name: APPSYNC_JS Version: 1.2.3 InlineCode: this is my epic code DataSource: MyDataSource diff --git a/tests/translator/output/aws-cn/graphqlapi_cognito_default_auth.json b/tests/translator/output/aws-cn/graphqlapi_cognito_default_auth.json index e32b49b83..391715a04 100644 --- a/tests/translator/output/aws-cn/graphqlapi_cognito_default_auth.json +++ b/tests/translator/output/aws-cn/graphqlapi_cognito_default_auth.json @@ -30,7 +30,7 @@ "UserPoolConfig": { "AppIdClientRegex": "myregex", "AwsRegion": "na-east-1", - "DefaultAction": "something", + "DefaultAction": "ALLOW", "UserPoolId": "myid" }, "XrayEnabled": true diff --git a/tests/translator/output/aws-cn/graphqlapi_function_by_id.json b/tests/translator/output/aws-cn/graphqlapi_function_by_id.json index ea9a7fc1c..678cbf2bf 100644 --- a/tests/translator/output/aws-cn/graphqlapi_function_by_id.json +++ b/tests/translator/output/aws-cn/graphqlapi_function_by_id.json @@ -12,7 +12,7 @@ "DataSourceName": "some-cool-datasource", "Name": "MyFunction", "Runtime": { - "Name": "some-runtime", + "Name": "APPSYNC_JS", "RuntimeVersion": "1.2.3" } }, diff --git a/tests/translator/output/aws-cn/graphqlapi_multiple_none_datasource_functions.json b/tests/translator/output/aws-cn/graphqlapi_multiple_none_datasource_functions.json index 43fb34207..a245392a3 100644 --- a/tests/translator/output/aws-cn/graphqlapi_multiple_none_datasource_functions.json +++ b/tests/translator/output/aws-cn/graphqlapi_multiple_none_datasource_functions.json @@ -39,7 +39,7 @@ }, "Name": "AnotherFunction", "Runtime": { - "Name": "some-runtime", + "Name": "APPSYNC_JS", "RuntimeVersion": "1.2.3" } }, @@ -88,7 +88,7 @@ }, "Name": "GoodFunction", "Runtime": { - "Name": "some-runtime", + "Name": "APPSYNC_JS", "RuntimeVersion": "1.2.3" } }, @@ -111,7 +111,7 @@ }, "Name": "MyFunction", "Runtime": { - "Name": "some-runtime", + "Name": "APPSYNC_JS", "RuntimeVersion": "1.2.3" } }, @@ -159,7 +159,7 @@ }, "Name": "SimilarFunction", "Runtime": { - "Name": "some-runtime", + "Name": "APPSYNC_JS", "RuntimeVersion": "1.2.3" } }, diff --git a/tests/translator/output/aws-cn/graphqlapi_resolver_function_with_lambda_datasource.json b/tests/translator/output/aws-cn/graphqlapi_resolver_function_with_lambda_datasource.json index dfce18342..c6021bf37 100644 --- a/tests/translator/output/aws-cn/graphqlapi_resolver_function_with_lambda_datasource.json +++ b/tests/translator/output/aws-cn/graphqlapi_resolver_function_with_lambda_datasource.json @@ -173,7 +173,7 @@ "MaxBatchSize": 10, "Name": "MyFunction", "Runtime": { - "Name": "some-runtime", + "Name": "APPSYNC_JS", "RuntimeVersion": "1.2.3" } }, diff --git a/tests/translator/output/aws-us-gov/graphqlapi_cognito_default_auth.json b/tests/translator/output/aws-us-gov/graphqlapi_cognito_default_auth.json index e32b49b83..391715a04 100644 --- a/tests/translator/output/aws-us-gov/graphqlapi_cognito_default_auth.json +++ b/tests/translator/output/aws-us-gov/graphqlapi_cognito_default_auth.json @@ -30,7 +30,7 @@ "UserPoolConfig": { "AppIdClientRegex": "myregex", "AwsRegion": "na-east-1", - "DefaultAction": "something", + "DefaultAction": "ALLOW", "UserPoolId": "myid" }, "XrayEnabled": true diff --git a/tests/translator/output/aws-us-gov/graphqlapi_function_by_id.json b/tests/translator/output/aws-us-gov/graphqlapi_function_by_id.json index ea9a7fc1c..678cbf2bf 100644 --- a/tests/translator/output/aws-us-gov/graphqlapi_function_by_id.json +++ b/tests/translator/output/aws-us-gov/graphqlapi_function_by_id.json @@ -12,7 +12,7 @@ "DataSourceName": "some-cool-datasource", "Name": "MyFunction", "Runtime": { - "Name": "some-runtime", + "Name": "APPSYNC_JS", "RuntimeVersion": "1.2.3" } }, diff --git a/tests/translator/output/aws-us-gov/graphqlapi_multiple_none_datasource_functions.json b/tests/translator/output/aws-us-gov/graphqlapi_multiple_none_datasource_functions.json index 43fb34207..a245392a3 100644 --- a/tests/translator/output/aws-us-gov/graphqlapi_multiple_none_datasource_functions.json +++ b/tests/translator/output/aws-us-gov/graphqlapi_multiple_none_datasource_functions.json @@ -39,7 +39,7 @@ }, "Name": "AnotherFunction", "Runtime": { - "Name": "some-runtime", + "Name": "APPSYNC_JS", "RuntimeVersion": "1.2.3" } }, @@ -88,7 +88,7 @@ }, "Name": "GoodFunction", "Runtime": { - "Name": "some-runtime", + "Name": "APPSYNC_JS", "RuntimeVersion": "1.2.3" } }, @@ -111,7 +111,7 @@ }, "Name": "MyFunction", "Runtime": { - "Name": "some-runtime", + "Name": "APPSYNC_JS", "RuntimeVersion": "1.2.3" } }, @@ -159,7 +159,7 @@ }, "Name": "SimilarFunction", "Runtime": { - "Name": "some-runtime", + "Name": "APPSYNC_JS", "RuntimeVersion": "1.2.3" } }, diff --git a/tests/translator/output/aws-us-gov/graphqlapi_resolver_function_with_lambda_datasource.json b/tests/translator/output/aws-us-gov/graphqlapi_resolver_function_with_lambda_datasource.json index dfce18342..c6021bf37 100644 --- a/tests/translator/output/aws-us-gov/graphqlapi_resolver_function_with_lambda_datasource.json +++ b/tests/translator/output/aws-us-gov/graphqlapi_resolver_function_with_lambda_datasource.json @@ -173,7 +173,7 @@ "MaxBatchSize": 10, "Name": "MyFunction", "Runtime": { - "Name": "some-runtime", + "Name": "APPSYNC_JS", "RuntimeVersion": "1.2.3" } }, diff --git a/tests/translator/output/graphqlapi_cognito_default_auth.json b/tests/translator/output/graphqlapi_cognito_default_auth.json index e32b49b83..391715a04 100644 --- a/tests/translator/output/graphqlapi_cognito_default_auth.json +++ b/tests/translator/output/graphqlapi_cognito_default_auth.json @@ -30,7 +30,7 @@ "UserPoolConfig": { "AppIdClientRegex": "myregex", "AwsRegion": "na-east-1", - "DefaultAction": "something", + "DefaultAction": "ALLOW", "UserPoolId": "myid" }, "XrayEnabled": true diff --git a/tests/translator/output/graphqlapi_function_by_id.json b/tests/translator/output/graphqlapi_function_by_id.json index ea9a7fc1c..678cbf2bf 100644 --- a/tests/translator/output/graphqlapi_function_by_id.json +++ b/tests/translator/output/graphqlapi_function_by_id.json @@ -12,7 +12,7 @@ "DataSourceName": "some-cool-datasource", "Name": "MyFunction", "Runtime": { - "Name": "some-runtime", + "Name": "APPSYNC_JS", "RuntimeVersion": "1.2.3" } }, diff --git a/tests/translator/output/graphqlapi_multiple_none_datasource_functions.json b/tests/translator/output/graphqlapi_multiple_none_datasource_functions.json index 43fb34207..a245392a3 100644 --- a/tests/translator/output/graphqlapi_multiple_none_datasource_functions.json +++ b/tests/translator/output/graphqlapi_multiple_none_datasource_functions.json @@ -39,7 +39,7 @@ }, "Name": "AnotherFunction", "Runtime": { - "Name": "some-runtime", + "Name": "APPSYNC_JS", "RuntimeVersion": "1.2.3" } }, @@ -88,7 +88,7 @@ }, "Name": "GoodFunction", "Runtime": { - "Name": "some-runtime", + "Name": "APPSYNC_JS", "RuntimeVersion": "1.2.3" } }, @@ -111,7 +111,7 @@ }, "Name": "MyFunction", "Runtime": { - "Name": "some-runtime", + "Name": "APPSYNC_JS", "RuntimeVersion": "1.2.3" } }, @@ -159,7 +159,7 @@ }, "Name": "SimilarFunction", "Runtime": { - "Name": "some-runtime", + "Name": "APPSYNC_JS", "RuntimeVersion": "1.2.3" } }, diff --git a/tests/translator/output/graphqlapi_resolver_function_with_lambda_datasource.json b/tests/translator/output/graphqlapi_resolver_function_with_lambda_datasource.json index dfce18342..c6021bf37 100644 --- a/tests/translator/output/graphqlapi_resolver_function_with_lambda_datasource.json +++ b/tests/translator/output/graphqlapi_resolver_function_with_lambda_datasource.json @@ -173,7 +173,7 @@ "MaxBatchSize": 10, "Name": "MyFunction", "Runtime": { - "Name": "some-runtime", + "Name": "APPSYNC_JS", "RuntimeVersion": "1.2.3" } },