You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2021/12/16 15:08:35 UTC

[incubator-ponymail-foal] branch master updated: Allow for minor differences in output

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new 683b673  Allow for minor differences in output
683b673 is described below

commit 683b6730d4c2b530cd9ea24de9aad236c100b47a
Author: Sebb <se...@apache.org>
AuthorDate: Thu Dec 16 15:08:23 2021 +0000

    Allow for minor differences in output
---
 tools/mappings.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/mappings.py b/tools/mappings.py
index bcfb572..360e759 100755
--- a/tools/mappings.py
+++ b/tools/mappings.py
@@ -84,7 +84,10 @@ def check_mapping(index):
   # actual mappings
   mappings = elastic.indices.get_mapping(index=index_name)[index_name]['mappings']['properties']
 
-  if mappings == mappings_expected:
+  expected = yaml.dump(mappings_expected, sort_keys = True)
+  actual = yaml.dump(mappings, sort_keys = True).replace("'true'","true")
+
+  if actual == expected:
     print("Mappings are as expected, hoorah!")
   else:
     print("Mappings differ:")