Skip to content

Fix parsing of some yaml tests on master #5315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/Tests.YamlRunner/Models.fs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ type Do = {
ApiCall: string * YamlMap
Catch:DoCatch option
Warnings:option<string list>
AllowedWarnings:option<string list>
NodeSelector:NodeSelector option
Headers: Headers option
AutoFail: bool
Expand Down
10 changes: 5 additions & 5 deletions tests/Tests.YamlRunner/SkipList.fs
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,11 @@ let SkipList = dict<SkipFile,SkipSection> [
//These are ignored because they were flagged on a big PR.

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

//Replace stashed value in body that is passed as string json
SkipFile "api_key/10_basic.yml", Section "Test get api key"

//additional enters in regex
SkipFile "cat.templates/10_basic.yml", Sections [ "Multiple template"; "Sort templates" ]


//new API TODO remove when we regenerate
SkipFile "cluster.voting_config_exclusions/10_basic.yml", All

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

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

// TODO investigate post 7.11.0
SkipFile "nodes.info/10_basic.yml", Section "node_info role test"

]


3 changes: 3 additions & 0 deletions tests/Tests.YamlRunner/TestsReader.fs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ let private mapDo section (operation:YamlMap) =
| None -> None

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

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