From c18f1ec67f9e2e25511c94e8a2332b328819d5ca Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 17 Oct 2023 20:27:23 -0400 Subject: [PATCH] Skip flaky yaml output test There seems to be little point in comparing YAML output as plain text, which is also subject to fields being listed in a different order, when the parsed output (which should be all that matters) is subsequently being compared. --- awscli2.spec | 2 ++ test-yaml.patch | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 test-yaml.patch diff --git a/awscli2.spec b/awscli2.spec index f5911e2..dca890e 100644 --- a/awscli2.spec +++ b/awscli2.spec @@ -19,6 +19,8 @@ Patch0: ruamel-yaml-0.17.32.patch Patch1: python312.patch # fix incorrect assertions in TestKubeconfigLoader Patch2: assertions.patch +# skip flaky test which compares yaml output as plain text +Patch3: test-yaml.patch BuildArch: noarch diff --git a/test-yaml.patch b/test-yaml.patch new file mode 100644 index 0000000..e51ba00 --- /dev/null +++ b/test-yaml.patch @@ -0,0 +1,16 @@ +The raw YAML output fields are sometimes printed in non-alphabetical +order, causing the raw text comparison to sometimes fail. The parsed +output is subsequently compared, and that should be all that matters. + +diff --git a/tests/unit/output/test_yaml_output.py b/tests/unit/output/test_yaml_output.py +index b5e3a0a..88132f7 100644 +--- a/tests/unit/output/test_yaml_output.py ++++ b/tests/unit/output/test_yaml_output.py +@@ -62,7 +62,6 @@ class TestYAMLOutput(BaseAWSCommandParamsTest): + " UserId: EXAMPLEUSERID\n" + " UserName: testuser-51\n" + ) +- self.assertEqual(stdout, expected) + parsed_output = self.yaml.load(stdout) + self.assertEqual(self.parsed_response, parsed_output) +