Skip to content

Commit 369b71d

Browse files
Fix parsing of some yaml tests on master (#5315)
* Skip cat template YAML test (#5313) Co-authored-by: Martijn Laarman <Mpdreamz@gmail.com> (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 <sgordon@hotmail.co.uk> (cherry picked from commit 78a0933)
1 parent ee412b4 commit 369b71d

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

tests/Tests.YamlRunner/Models.fs

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

tests/Tests.YamlRunner/SkipList.fs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ let SkipList = dict<SkipFile,SkipSection> [
183183
// TODO investigate post 7.11.0
184184
SkipFile "nodes.info/10_basic.yml", Section "node_info role test"
185185

186+
// TODO investigate post 7.11.0
187+
SkipFile "nodes.info/10_basic.yml", Section "node_info role test"
188+
186189
]
187190

188191

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)