Skip to content

Commit

Permalink
fix yamlint
Browse files Browse the repository at this point in the history
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
  • Loading branch information
arkodg committed Jan 17, 2023
1 parent 42745a6 commit a63a1fa
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 87 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
domain: first-listener
descriptors:
- key: first-route-key-rule-0-match-0
value: ""
rate_limit:
requests_per_unit: 5
unit: second
unlimited: false
name: ""
replaces: []
descriptors: []
shadow_mode: false
- key: first-route-key-rule-0-match-0
value: ""
rate_limit:
requests_per_unit: 5
unit: second
unlimited: false
name: ""
replaces: []
descriptors: []
shadow_mode: false
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
domain: first-listener
descriptors:
- key: first-route-key-rule-0-match--1
value: first-route-value-rule-0-match--1
rate_limit:
requests_per_unit: 5
unit: second
unlimited: false
name: ""
replaces: []
descriptors: []
shadow_mode: false
- key: first-route-key-rule-0-match--1
value: first-route-value-rule-0-match--1
rate_limit:
requests_per_unit: 5
unit: second
unlimited: false
name: ""
replaces: []
descriptors: []
shadow_mode: false
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
domain: first-listener
descriptors:
- key: first-route-key-rule-0-match-0
value: first-route-value-rule-0-match-0
rate_limit: null
descriptors:
- key: first-route-key-rule-0-match-1
value: first-route-value-rule-0-match-1
rate_limit:
requests_per_unit: 5
unit: second
unlimited: false
name: ""
replaces: []
descriptors: []
shadow_mode: false
shadow_mode: false
- key: first-route-key-rule-0-match-0
value: first-route-value-rule-0-match-0
rate_limit: null
descriptors:
- key: first-route-key-rule-0-match-1
value: first-route-value-rule-0-match-1
rate_limit:
requests_per_unit: 5
unit: second
unlimited: false
name: ""
replaces: []
descriptors: []
shadow_mode: false
shadow_mode: false
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
domain: first-listener
descriptors:
- key: first-route-key-rule-0-match-0
value: first-route-value-rule-0-match-0
rate_limit:
requests_per_unit: 5
unit: second
unlimited: false
name: ""
replaces: []
descriptors: []
shadow_mode: false
- key: second-route-key-rule-0-match-0
value: second-route-value-rule-0-match-0
rate_limit:
requests_per_unit: 10
unit: second
unlimited: false
name: ""
replaces: []
descriptors: []
shadow_mode: false
- key: first-route-key-rule-0-match-0
value: first-route-value-rule-0-match-0
rate_limit:
requests_per_unit: 5
unit: second
unlimited: false
name: ""
replaces: []
descriptors: []
shadow_mode: false
- key: second-route-key-rule-0-match-0
value: second-route-value-rule-0-match-0
rate_limit:
requests_per_unit: 10
unit: second
unlimited: false
name: ""
replaces: []
descriptors: []
shadow_mode: false
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
domain: first-listener
descriptors:
- key: first-route-key-rule-0-match-0
value: first-route-value-rule-0-match-0
rate_limit:
requests_per_unit: 5
unit: second
unlimited: false
name: ""
replaces: []
descriptors: []
shadow_mode: false
- key: first-route-key-rule-1-match-0
value: first-route-value-rule-1-match-0
rate_limit:
requests_per_unit: 10
unit: second
unlimited: false
name: ""
replaces: []
descriptors: []
shadow_mode: false
- key: first-route-key-rule-0-match-0
value: first-route-value-rule-0-match-0
rate_limit:
requests_per_unit: 5
unit: second
unlimited: false
name: ""
replaces: []
descriptors: []
shadow_mode: false
- key: first-route-key-rule-1-match-0
value: first-route-value-rule-1-match-0
rate_limit:
requests_per_unit: 10
unit: second
unlimited: false
name: ""
replaces: []
descriptors: []
shadow_mode: false
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
domain: first-listener
descriptors:
- key: first-route-key-rule-0-match-0
value: first-route-value-rule-0-match-0
rate_limit:
requests_per_unit: 5
unit: second
unlimited: false
name: ""
replaces: []
descriptors: []
shadow_mode: false
- key: first-route-key-rule-0-match-0
value: first-route-value-rule-0-match-0
rate_limit:
requests_per_unit: 5
unit: second
unlimited: false
name: ""
replaces: []
descriptors: []
shadow_mode: false
7 changes: 5 additions & 2 deletions internal/xds/translator/translator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,12 @@ func requireTestDataOutFile(t *testing.T, name ...string) string {
}

func requireYamlRootToYAMLString(t *testing.T, yamlRoot *ratelimitserviceconfig.YamlRoot) string {
data, err := goyaml.Marshal(*yamlRoot)
var buf bytes.Buffer
enc := goyaml.NewEncoder(&buf)
enc.SetIndent(2)
err := enc.Encode(*yamlRoot)
require.NoError(t, err)
return string(data)
return buf.String()
}

func requireResourcesToYAMLString(t *testing.T, resources []types.Resource) string {
Expand Down

0 comments on commit a63a1fa

Please sign in to comment.