Skip to content

Commit 78a0933

Browse files
Fix parsing of some yaml tests on master (#5315)
* Skip cat template YAML test (#5313) Co-authored-by: Martijn Laarman <[email protected]> (cherry picked from commit 9251068) * No longer fail to parse when allowed_warnings is last in the do operation definition Co-authored-by: Steve Gordon <[email protected]>
1 parent 5f31299 commit 78a0933

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

tests/Tests.YamlRunner/Models.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ type Do = {
122122
ApiCall: string * YamlMap
123123
Catch:DoCatch option
124124
Warnings:option<string list>
125+
AllowedWarnings:option<string list>
125126
NodeSelector:NodeSelector option
126127
Headers: Headers option
127128
AutoFail: bool

tests/Tests.YamlRunner/SkipList.fs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,11 @@ let SkipList = dict<SkipFile,SkipSection> [
158158
//These are ignored because they were flagged on a big PR.
159159

160160
//additional enters in regex
161-
SkipFile "cat.templates/10_basic.yml", Sections [ "Multiple template"; "Sort templates" ]
161+
SkipFile "cat.templates/10_basic.yml", Sections [ "Multiple template"; "Sort templates"; "No templates" ]
162162

163163
//Replace stashed value in body that is passed as string json
164164
SkipFile "api_key/10_basic.yml", Section "Test get api key"
165-
166-
//additional enters in regex
167-
SkipFile "cat.templates/10_basic.yml", Sections [ "Multiple template"; "Sort templates" ]
168-
165+
169166
//new API TODO remove when we regenerate
170167
SkipFile "cluster.voting_config_exclusions/10_basic.yml", All
171168

@@ -184,6 +181,9 @@ let SkipList = dict<SkipFile,SkipSection> [
184181

185182
SkipFile "ml/inference_processor.yml", Section "Test simulate"
186183

184+
// TODO investigate post 7.11.0
185+
SkipFile "nodes.info/10_basic.yml", Section "node_info role test"
186+
187187
]
188188

189189

tests/Tests.YamlRunner/TestsReader.fs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ let private mapDo section (operation:YamlMap) =
150150
| None -> None
151151

152152
let warnings = tryPickList<string, string> operation "warnings" id
153+
// TODO: we don't support this feature yet but do parse it out so we don't crash our yaml parser
154+
let allowedWarnings = tryPickList<string, string> operation "allowed_warnings" id
153155
let nodeSelector = mapNodeSelector operation
154156

155157
let last = operation.Last()
@@ -161,6 +163,7 @@ let private mapDo section (operation:YamlMap) =
161163
ApiCall = (lastKey, lastValue)
162164
Catch = catch
163165
Warnings = warnings
166+
AllowedWarnings = allowedWarnings
164167
NodeSelector = nodeSelector
165168
Headers = headers
166169
AutoFail = match section with | "setup" | "teardown" -> false | _ -> false

0 commit comments

Comments
 (0)