Skip to content

Commit e217689

Browse files
authored
chore: Explicitly make our test yamls yaml 1.1 (#2579)
1 parent cc017c3 commit e217689

File tree

564 files changed

+1131
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

564 files changed

+1131
-3
lines changed

bin/yaml-format.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
from bin._file_formatter import FileFormatter
1818

1919
yaml = YAML()
20+
# We have pyyaml (5.4) to parse our yamls in this repo,
21+
# and pyyaml uses Yaml 1.1
22+
yaml.version = (1, 1) # type: ignore
2023

2124

2225
class YAMLFormatter(FileFormatter):

tests/translator/input/alexa_skill.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
%YAML 1.1
2+
---
13
# File: sam.yml
24
# Version: 0.9
35

tests/translator/input/alexa_skill_with_skill_id.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
%YAML 1.1
2+
---
13
# File: sam.yml
24
# Version: 0.9
35

tests/translator/input/all_policy_templates.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
%YAML 1.1
2+
---
13
# "Kitchen Sink" test containing all supported policy templates. The idea is to know every one of them is
24
# transformable and fail on any changes in the policy template definition without updating the test
35
# Since this not about testing the transformation logic, we will keep the policy template parameter values as literal

tests/translator/input/api_cache.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
%YAML 1.1
2+
---
13
Resources:
24
HtmlFunction:
35
Type: AWS::Serverless::Function

tests/translator/input/api_description.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
%YAML 1.1
2+
---
13
Resources:
24
Function:
35
Type: AWS::Serverless::Function

tests/translator/input/api_endpoint_configuration.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
%YAML 1.1
2+
---
13
Parameters:
24
EndpointConfig:
35
Type: String

tests/translator/input/api_endpoint_configuration_with_vpcendpoint.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
%YAML 1.1
2+
---
13
Parameters:
24
EndpointConfigType:
35
Type: String

tests/translator/input/api_http_paths_with_if_condition.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
%YAML 1.1
2+
---
13
AWSTemplateFormatVersion: '2010-09-09'
24
Transform: AWS::Serverless-2016-10-31
35
Description: >

tests/translator/input/api_http_paths_with_if_condition_no_value_else_case.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
%YAML 1.1
2+
---
13
AWSTemplateFormatVersion: '2010-09-09'
24
Transform: AWS::Serverless-2016-10-31
35
Description: >

0 commit comments

Comments
 (0)