From f11ec88e498511b0602fd129b1c50d2fcd7e6312 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Wed, 10 Feb 2021 21:17:27 +0000 Subject: [PATCH 1/2] Skip cat template YAML test (#5313) Co-authored-by: Martijn Laarman (cherry picked from commit 92510686bac2200560ae5d9ccc8a80fc127b0312) --- tests/Tests.YamlRunner/SkipList.fs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/Tests.YamlRunner/SkipList.fs b/tests/Tests.YamlRunner/SkipList.fs index 37127513b53..5cf5232bd30 100644 --- a/tests/Tests.YamlRunner/SkipList.fs +++ b/tests/Tests.YamlRunner/SkipList.fs @@ -158,14 +158,11 @@ let SkipList = dict [ //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 @@ -184,6 +181,9 @@ let SkipList = dict [ 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" + ] From 6cb75bd7338816ac9465357de03b1db7ca1d50fe Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Wed, 10 Feb 2021 22:53:01 +0100 Subject: [PATCH 2/2] No longer fail to parse when allowed_warnings is last in the do operation definition --- tests/Tests.YamlRunner/Models.fs | 1 + tests/Tests.YamlRunner/TestsReader.fs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tests/Tests.YamlRunner/Models.fs b/tests/Tests.YamlRunner/Models.fs index 1bef6c09642..e6a0ff67f7d 100644 --- a/tests/Tests.YamlRunner/Models.fs +++ b/tests/Tests.YamlRunner/Models.fs @@ -122,6 +122,7 @@ type Do = { ApiCall: string * YamlMap Catch:DoCatch option Warnings:option + AllowedWarnings:option NodeSelector:NodeSelector option Headers: Headers option AutoFail: bool diff --git a/tests/Tests.YamlRunner/TestsReader.fs b/tests/Tests.YamlRunner/TestsReader.fs index 57cdc46fef2..256012c79bd 100644 --- a/tests/Tests.YamlRunner/TestsReader.fs +++ b/tests/Tests.YamlRunner/TestsReader.fs @@ -150,6 +150,8 @@ let private mapDo section (operation:YamlMap) = | None -> None let warnings = tryPickList 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 operation "allowed_warnings" id let nodeSelector = mapNodeSelector operation let last = operation.Last() @@ -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