From 049486da03a7ea638183fdbe1fd300387469bc20 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Mon, 10 Feb 2025 09:43:37 +0100 Subject: [PATCH] feat: output return status too --- src/rougail/output_json/__init__.py | 13 +++-- src/rougail/output_json/config.py | 2 +- src/rougail/output_json/i18n.py | 2 +- tests/results/test/00_6secret.json | 4 ++ ..._9default_information_other_variable2.json | 4 ++ tests/results/test/01_6string_multi.json | 6 ++- ..._5disabled_calculation_variable_multi.json | 3 ++ tests/results/test/16_6exists_family.json | 1 + tests/results/test/20_9family_absolute.json | 24 +++++++++ ...ip-calculation-outside-follower-first.json | 24 +++++++++ ...hip-calculation-outside-follower-last.json | 24 +++++++++ ...adership-calculation-outside-follower.json | 24 +++++++++ ...ship-calculation-outside-leader-first.json | 20 +++++++ ...rship-calculation-outside-leader-last.json | 20 +++++++ ...leadership-calculation-outside-leader.json | 24 +++++++++ tests/results/test_mandatory/00_6secret.json | 4 ++ ..._9default_information_other_variable2.json | 4 ++ .../test_mandatory/01_6string_multi.json | 6 ++- ..._5disabled_calculation_variable_multi.json | 3 ++ .../test_mandatory/16_6exists_family.json | 1 + .../test_mandatory/20_9family_absolute.json | 24 +++++++++ ...ip-calculation-outside-follower-first.json | 24 +++++++++ ...hip-calculation-outside-follower-last.json | 24 +++++++++ ...adership-calculation-outside-follower.json | 24 +++++++++ ...ship-calculation-outside-leader-first.json | 20 +++++++ ...rship-calculation-outside-leader-last.json | 20 +++++++ ...leadership-calculation-outside-leader.json | 24 +++++++++ tests/results/test_namespace/00_6secret.json | 6 +++ ..._9default_information_other_variable2.json | 6 +++ .../test_namespace/00_9extra_ouside.json | 8 +++ .../test_namespace/01_6string_multi.json | 6 ++- .../04_5disabled_calculation_multi.json | 15 ++++++ ..._5disabled_calculation_variable_multi.json | 5 ++ .../test_namespace/16_6exists_family.json | 3 ++ ...ip-calculation-outside-follower-first.json | 26 ++++++++++ ...hip-calculation-outside-follower-last.json | 26 ++++++++++ ...adership-calculation-outside-follower.json | 26 ++++++++++ ...ship-calculation-outside-leader-first.json | 22 ++++++++ ...rship-calculation-outside-leader-last.json | 22 ++++++++ ...leadership-calculation-outside-leader.json | 26 ++++++++++ ...60_6family_dynamic_sub_dynamic_empty2.json | 52 +++++++++++++++++++ .../test_namespace_mandatory/00_6secret.json | 6 +++ ..._9default_information_other_variable2.json | 6 +++ .../00_9extra_ouside.json | 8 +++ .../01_6string_multi.json | 6 ++- .../04_5disabled_calculation_multi.json | 15 ++++++ ..._5disabled_calculation_variable_multi.json | 5 ++ .../16_6exists_family.json | 3 ++ ...ip-calculation-outside-follower-first.json | 26 ++++++++++ ...hip-calculation-outside-follower-last.json | 26 ++++++++++ ...adership-calculation-outside-follower.json | 26 ++++++++++ ...ship-calculation-outside-leader-first.json | 22 ++++++++ ...rship-calculation-outside-leader-last.json | 22 ++++++++ ...leadership-calculation-outside-leader.json | 26 ++++++++++ ...60_6family_dynamic_sub_dynamic_empty2.json | 52 +++++++++++++++++++ .../test_namespace_read_write/00_6secret.json | 6 +++ ..._9default_information_other_variable2.json | 6 +++ .../00_9extra_ouside.json | 8 +++ .../01_6string_multi.json | 2 +- .../04_5disabled_calculation_multi.json | 7 +++ ..._5disabled_calculation_variable_multi.json | 6 +++ .../16_6exists_family.json | 3 ++ ...ip-calculation-outside-follower-first.json | 19 +++++++ ...hip-calculation-outside-follower-last.json | 19 +++++++ ...adership-calculation-outside-follower.json | 20 +++++++ ...ship-calculation-outside-leader-first.json | 17 ++++++ ...rship-calculation-outside-leader-last.json | 17 ++++++ ...leadership-calculation-outside-leader.json | 20 +++++++ ...60_6family_dynamic_sub_dynamic_empty2.json | 14 +++++ .../00_6secret.json | 6 +++ ..._9default_information_other_variable2.json | 6 +++ .../00_9extra_ouside.json | 8 +++ .../01_6string_multi.json | 6 ++- .../04_5disabled_calculation_multi.json | 15 ++++++ ..._5disabled_calculation_variable_multi.json | 5 ++ .../16_6exists_family.json | 3 ++ ...ip-calculation-outside-follower-first.json | 26 ++++++++++ ...hip-calculation-outside-follower-last.json | 26 ++++++++++ ...adership-calculation-outside-follower.json | 26 ++++++++++ ...ship-calculation-outside-leader-first.json | 22 ++++++++ ...rship-calculation-outside-leader-last.json | 22 ++++++++ ...leadership-calculation-outside-leader.json | 26 ++++++++++ ...60_6family_dynamic_sub_dynamic_empty2.json | 52 +++++++++++++++++++ .../00_6secret.json | 6 +++ ..._9default_information_other_variable2.json | 7 +++ .../00_9extra_ouside.json | 8 +++ .../04_5disabled_calculation_multi.json | 7 +++ ..._5disabled_calculation_variable_multi.json | 6 +++ .../16_6exists_family.json | 3 ++ ...ip-calculation-outside-follower-first.json | 19 +++++++ ...hip-calculation-outside-follower-last.json | 19 +++++++ ...adership-calculation-outside-follower.json | 20 +++++++ ...ship-calculation-outside-leader-first.json | 17 ++++++ ...rship-calculation-outside-leader-last.json | 17 ++++++ ...leadership-calculation-outside-leader.json | 20 +++++++ ...60_6family_dynamic_sub_dynamic_empty2.json | 14 +++++ tests/results/test_read_write/00_6secret.json | 4 ++ ..._9default_information_other_variable2.json | 4 ++ .../test_read_write/01_6string_multi.json | 2 +- ..._5disabled_calculation_variable_multi.json | 4 ++ .../test_read_write/16_6exists_family.json | 1 + .../test_read_write/20_9family_absolute.json | 23 ++++++++ ...ip-calculation-outside-follower-first.json | 17 ++++++ ...hip-calculation-outside-follower-last.json | 17 ++++++ ...adership-calculation-outside-follower.json | 18 +++++++ ...ship-calculation-outside-leader-first.json | 15 ++++++ ...rship-calculation-outside-leader-last.json | 15 ++++++ ...leadership-calculation-outside-leader.json | 18 +++++++ .../test_read_write_mandatory/00_6secret.json | 4 ++ ..._9default_information_other_variable2.json | 4 ++ .../01_6string_multi.json | 6 ++- ..._5disabled_calculation_variable_multi.json | 3 ++ .../16_6exists_family.json | 1 + .../20_9family_absolute.json | 24 +++++++++ ...ip-calculation-outside-follower-first.json | 24 +++++++++ ...hip-calculation-outside-follower-last.json | 24 +++++++++ ...adership-calculation-outside-follower.json | 24 +++++++++ ...ship-calculation-outside-leader-first.json | 20 +++++++ ...rship-calculation-outside-leader-last.json | 20 +++++++ ...leadership-calculation-outside-leader.json | 24 +++++++++ .../00_6secret.json | 6 +++ ..._9default_information_other_variable2.json | 7 +++ ..._5disabled_calculation_variable_multi.json | 6 +++ .../16_6exists_family.json | 1 + .../20_9family_absolute.json | 10 ++++ ...ip-calculation-outside-follower-first.json | 17 ++++++ ...hip-calculation-outside-follower-last.json | 17 ++++++ ...adership-calculation-outside-follower.json | 18 +++++++ ...ship-calculation-outside-leader-first.json | 15 ++++++ ...rship-calculation-outside-leader-last.json | 15 ++++++ ...leadership-calculation-outside-leader.json | 18 +++++++ tests/test_load.py | 2 +- 132 files changed, 1879 insertions(+), 16 deletions(-) create mode 100644 tests/results/test/00_6secret.json create mode 100644 tests/results/test/00_9default_information_other_variable2.json create mode 100644 tests/results/test/04_5disabled_calculation_variable_multi.json create mode 100644 tests/results/test/16_6exists_family.json create mode 100644 tests/results/test/20_9family_absolute.json create mode 100644 tests/results/test/40_9leadership-calculation-outside-follower-first.json create mode 100644 tests/results/test/40_9leadership-calculation-outside-follower-last.json create mode 100644 tests/results/test/40_9leadership-calculation-outside-follower.json create mode 100644 tests/results/test/40_9leadership-calculation-outside-leader-first.json create mode 100644 tests/results/test/40_9leadership-calculation-outside-leader-last.json create mode 100644 tests/results/test/40_9leadership-calculation-outside-leader.json create mode 100644 tests/results/test_mandatory/00_6secret.json create mode 100644 tests/results/test_mandatory/00_9default_information_other_variable2.json create mode 100644 tests/results/test_mandatory/04_5disabled_calculation_variable_multi.json create mode 100644 tests/results/test_mandatory/16_6exists_family.json create mode 100644 tests/results/test_mandatory/20_9family_absolute.json create mode 100644 tests/results/test_mandatory/40_9leadership-calculation-outside-follower-first.json create mode 100644 tests/results/test_mandatory/40_9leadership-calculation-outside-follower-last.json create mode 100644 tests/results/test_mandatory/40_9leadership-calculation-outside-follower.json create mode 100644 tests/results/test_mandatory/40_9leadership-calculation-outside-leader-first.json create mode 100644 tests/results/test_mandatory/40_9leadership-calculation-outside-leader-last.json create mode 100644 tests/results/test_mandatory/40_9leadership-calculation-outside-leader.json create mode 100644 tests/results/test_namespace/00_6secret.json create mode 100644 tests/results/test_namespace/00_9default_information_other_variable2.json create mode 100644 tests/results/test_namespace/00_9extra_ouside.json create mode 100644 tests/results/test_namespace/04_5disabled_calculation_multi.json create mode 100644 tests/results/test_namespace/04_5disabled_calculation_variable_multi.json create mode 100644 tests/results/test_namespace/16_6exists_family.json create mode 100644 tests/results/test_namespace/40_9leadership-calculation-outside-follower-first.json create mode 100644 tests/results/test_namespace/40_9leadership-calculation-outside-follower-last.json create mode 100644 tests/results/test_namespace/40_9leadership-calculation-outside-follower.json create mode 100644 tests/results/test_namespace/40_9leadership-calculation-outside-leader-first.json create mode 100644 tests/results/test_namespace/40_9leadership-calculation-outside-leader-last.json create mode 100644 tests/results/test_namespace/40_9leadership-calculation-outside-leader.json create mode 100644 tests/results/test_namespace/60_6family_dynamic_sub_dynamic_empty2.json create mode 100644 tests/results/test_namespace_mandatory/00_6secret.json create mode 100644 tests/results/test_namespace_mandatory/00_9default_information_other_variable2.json create mode 100644 tests/results/test_namespace_mandatory/00_9extra_ouside.json create mode 100644 tests/results/test_namespace_mandatory/04_5disabled_calculation_multi.json create mode 100644 tests/results/test_namespace_mandatory/04_5disabled_calculation_variable_multi.json create mode 100644 tests/results/test_namespace_mandatory/16_6exists_family.json create mode 100644 tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-follower-first.json create mode 100644 tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-follower-last.json create mode 100644 tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-follower.json create mode 100644 tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-leader-first.json create mode 100644 tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-leader-last.json create mode 100644 tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-leader.json create mode 100644 tests/results/test_namespace_mandatory/60_6family_dynamic_sub_dynamic_empty2.json create mode 100644 tests/results/test_namespace_read_write/00_6secret.json create mode 100644 tests/results/test_namespace_read_write/00_9default_information_other_variable2.json create mode 100644 tests/results/test_namespace_read_write/00_9extra_ouside.json create mode 100644 tests/results/test_namespace_read_write/04_5disabled_calculation_multi.json create mode 100644 tests/results/test_namespace_read_write/04_5disabled_calculation_variable_multi.json create mode 100644 tests/results/test_namespace_read_write/16_6exists_family.json create mode 100644 tests/results/test_namespace_read_write/40_9leadership-calculation-outside-follower-first.json create mode 100644 tests/results/test_namespace_read_write/40_9leadership-calculation-outside-follower-last.json create mode 100644 tests/results/test_namespace_read_write/40_9leadership-calculation-outside-follower.json create mode 100644 tests/results/test_namespace_read_write/40_9leadership-calculation-outside-leader-first.json create mode 100644 tests/results/test_namespace_read_write/40_9leadership-calculation-outside-leader-last.json create mode 100644 tests/results/test_namespace_read_write/40_9leadership-calculation-outside-leader.json create mode 100644 tests/results/test_namespace_read_write/60_6family_dynamic_sub_dynamic_empty2.json create mode 100644 tests/results/test_namespace_read_write_mandatory/00_6secret.json create mode 100644 tests/results/test_namespace_read_write_mandatory/00_9default_information_other_variable2.json create mode 100644 tests/results/test_namespace_read_write_mandatory/00_9extra_ouside.json create mode 100644 tests/results/test_namespace_read_write_mandatory/04_5disabled_calculation_multi.json create mode 100644 tests/results/test_namespace_read_write_mandatory/04_5disabled_calculation_variable_multi.json create mode 100644 tests/results/test_namespace_read_write_mandatory/16_6exists_family.json create mode 100644 tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-follower-first.json create mode 100644 tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-follower-last.json create mode 100644 tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-follower.json create mode 100644 tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-leader-first.json create mode 100644 tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-leader-last.json create mode 100644 tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-leader.json create mode 100644 tests/results/test_namespace_read_write_mandatory/60_6family_dynamic_sub_dynamic_empty2.json create mode 100644 tests/results/test_namespace_read_write_mandatory_errors/00_6secret.json create mode 100644 tests/results/test_namespace_read_write_mandatory_errors/00_9default_information_other_variable2.json create mode 100644 tests/results/test_namespace_read_write_mandatory_errors/00_9extra_ouside.json create mode 100644 tests/results/test_namespace_read_write_mandatory_errors/04_5disabled_calculation_multi.json create mode 100644 tests/results/test_namespace_read_write_mandatory_errors/04_5disabled_calculation_variable_multi.json create mode 100644 tests/results/test_namespace_read_write_mandatory_errors/16_6exists_family.json create mode 100644 tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-follower-first.json create mode 100644 tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-follower-last.json create mode 100644 tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-follower.json create mode 100644 tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-leader-first.json create mode 100644 tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-leader-last.json create mode 100644 tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-leader.json create mode 100644 tests/results/test_namespace_read_write_mandatory_errors/60_6family_dynamic_sub_dynamic_empty2.json create mode 100644 tests/results/test_read_write/00_6secret.json create mode 100644 tests/results/test_read_write/00_9default_information_other_variable2.json create mode 100644 tests/results/test_read_write/04_5disabled_calculation_variable_multi.json create mode 100644 tests/results/test_read_write/16_6exists_family.json create mode 100644 tests/results/test_read_write/20_9family_absolute.json create mode 100644 tests/results/test_read_write/40_9leadership-calculation-outside-follower-first.json create mode 100644 tests/results/test_read_write/40_9leadership-calculation-outside-follower-last.json create mode 100644 tests/results/test_read_write/40_9leadership-calculation-outside-follower.json create mode 100644 tests/results/test_read_write/40_9leadership-calculation-outside-leader-first.json create mode 100644 tests/results/test_read_write/40_9leadership-calculation-outside-leader-last.json create mode 100644 tests/results/test_read_write/40_9leadership-calculation-outside-leader.json create mode 100644 tests/results/test_read_write_mandatory/00_6secret.json create mode 100644 tests/results/test_read_write_mandatory/00_9default_information_other_variable2.json create mode 100644 tests/results/test_read_write_mandatory/04_5disabled_calculation_variable_multi.json create mode 100644 tests/results/test_read_write_mandatory/16_6exists_family.json create mode 100644 tests/results/test_read_write_mandatory/20_9family_absolute.json create mode 100644 tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-follower-first.json create mode 100644 tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-follower-last.json create mode 100644 tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-follower.json create mode 100644 tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-leader-first.json create mode 100644 tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-leader-last.json create mode 100644 tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-leader.json create mode 100644 tests/results/test_read_write_mandatory_errors/00_6secret.json create mode 100644 tests/results/test_read_write_mandatory_errors/00_9default_information_other_variable2.json create mode 100644 tests/results/test_read_write_mandatory_errors/04_5disabled_calculation_variable_multi.json create mode 100644 tests/results/test_read_write_mandatory_errors/16_6exists_family.json create mode 100644 tests/results/test_read_write_mandatory_errors/20_9family_absolute.json create mode 100644 tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-follower-first.json create mode 100644 tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-follower-last.json create mode 100644 tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-follower.json create mode 100644 tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-leader-first.json create mode 100644 tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-leader-last.json create mode 100644 tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-leader.json diff --git a/src/rougail/output_json/__init__.py b/src/rougail/output_json/__init__.py index e361851..cac4804 100644 --- a/src/rougail/output_json/__init__.py +++ b/src/rougail/output_json/__init__.py @@ -1,6 +1,6 @@ """ Silique (https://www.silique.fr) -Copyright (C) 2022-2024 +Copyright (C) 2022-2025 This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the @@ -59,11 +59,13 @@ class RougailOutputJson: self.dico = {} def run(self) -> None: - self.exporter() - return dumps(self.dico, ensure_ascii=False, indent=2) + '\n' + ret = self.exporter() + return ret, dumps(self.dico, ensure_ascii=False, indent=2) + '\n' def print(self) -> str: - print(self.run()) + ret, data = self.run() + print(data) + return ret def exporter(self) -> None: self.config.property.read_write() @@ -71,13 +73,14 @@ class RougailOutputJson: self.manage_warnings() self.config.property.read_only() if self.manage_errors(): - return + return False if self.read_write: self.config.property.read_write() self.parse_family( self.config, self.dico, ) + return True def mandatory(self): if not self.is_mandatory: diff --git a/src/rougail/output_json/config.py b/src/rougail/output_json/config.py index ade398f..4075f78 100644 --- a/src/rougail/output_json/config.py +++ b/src/rougail/output_json/config.py @@ -1,6 +1,6 @@ """ Silique (https://www.silique.fr) -Copyright (C) 2024 +Copyright (C) 2024-2025 This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the diff --git a/src/rougail/output_json/i18n.py b/src/rougail/output_json/i18n.py index fb82d2c..f733453 100644 --- a/src/rougail/output_json/i18n.py +++ b/src/rougail/output_json/i18n.py @@ -1,6 +1,6 @@ """Internationalisation utilities Silique (https://www.silique.fr) -Copyright (C) 2024 +Copyright (C) 2024-2025 This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the diff --git a/tests/results/test/00_6secret.json b/tests/results/test/00_6secret.json new file mode 100644 index 0000000..179dc87 --- /dev/null +++ b/tests/results/test/00_6secret.json @@ -0,0 +1,4 @@ +{ + "secret1": "string1", + "secret2": "string1" +} diff --git a/tests/results/test/00_9default_information_other_variable2.json b/tests/results/test/00_9default_information_other_variable2.json new file mode 100644 index 0000000..ba2b3b2 --- /dev/null +++ b/tests/results/test/00_9default_information_other_variable2.json @@ -0,0 +1,4 @@ +{ + "var1": "string1", + "var2": "string1" +} diff --git a/tests/results/test/01_6string_multi.json b/tests/results/test/01_6string_multi.json index 60d55eb..b80ef0f 100644 --- a/tests/results/test/01_6string_multi.json +++ b/tests/results/test/01_6string_multi.json @@ -9,7 +9,11 @@ "string2", "string3" ], - "var3": "string1", + "var3": [ + "string1", + "string2", + "string3" + ], "var4": [ "string1", "string2", diff --git a/tests/results/test/04_5disabled_calculation_variable_multi.json b/tests/results/test/04_5disabled_calculation_variable_multi.json new file mode 100644 index 0000000..d8b1c5f --- /dev/null +++ b/tests/results/test/04_5disabled_calculation_variable_multi.json @@ -0,0 +1,3 @@ +{ + "condition": true +} diff --git a/tests/results/test/16_6exists_family.json b/tests/results/test/16_6exists_family.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/tests/results/test/16_6exists_family.json @@ -0,0 +1 @@ +{} diff --git a/tests/results/test/20_9family_absolute.json b/tests/results/test/20_9family_absolute.json new file mode 100644 index 0000000..5dfce22 --- /dev/null +++ b/tests/results/test/20_9family_absolute.json @@ -0,0 +1,24 @@ +{ + "var1": "string1", + "family": { + "var2": "string6", + "subfamily": { + "variable": [ + "string1", + "string2", + "string3" + ] + } + }, + "family2": { + "var2": "string1", + "var3": "string5", + "subfamily": { + "variable": [ + "string1", + "string2", + "string3" + ] + } + } +} diff --git a/tests/results/test/40_9leadership-calculation-outside-follower-first.json b/tests/results/test/40_9leadership-calculation-outside-follower-first.json new file mode 100644 index 0000000..7b9def1 --- /dev/null +++ b/tests/results/test/40_9leadership-calculation-outside-follower-first.json @@ -0,0 +1,24 @@ +{ + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] +} diff --git a/tests/results/test/40_9leadership-calculation-outside-follower-last.json b/tests/results/test/40_9leadership-calculation-outside-follower-last.json new file mode 100644 index 0000000..7b9def1 --- /dev/null +++ b/tests/results/test/40_9leadership-calculation-outside-follower-last.json @@ -0,0 +1,24 @@ +{ + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] +} diff --git a/tests/results/test/40_9leadership-calculation-outside-follower.json b/tests/results/test/40_9leadership-calculation-outside-follower.json new file mode 100644 index 0000000..7b9def1 --- /dev/null +++ b/tests/results/test/40_9leadership-calculation-outside-follower.json @@ -0,0 +1,24 @@ +{ + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] +} diff --git a/tests/results/test/40_9leadership-calculation-outside-leader-first.json b/tests/results/test/40_9leadership-calculation-outside-leader-first.json new file mode 100644 index 0000000..1c195c3 --- /dev/null +++ b/tests/results/test/40_9leadership-calculation-outside-leader-first.json @@ -0,0 +1,20 @@ +{ + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": "string1" +} diff --git a/tests/results/test/40_9leadership-calculation-outside-leader-last.json b/tests/results/test/40_9leadership-calculation-outside-leader-last.json new file mode 100644 index 0000000..1c195c3 --- /dev/null +++ b/tests/results/test/40_9leadership-calculation-outside-leader-last.json @@ -0,0 +1,20 @@ +{ + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": "string1" +} diff --git a/tests/results/test/40_9leadership-calculation-outside-leader.json b/tests/results/test/40_9leadership-calculation-outside-leader.json new file mode 100644 index 0000000..7b9def1 --- /dev/null +++ b/tests/results/test/40_9leadership-calculation-outside-leader.json @@ -0,0 +1,24 @@ +{ + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] +} diff --git a/tests/results/test_mandatory/00_6secret.json b/tests/results/test_mandatory/00_6secret.json new file mode 100644 index 0000000..179dc87 --- /dev/null +++ b/tests/results/test_mandatory/00_6secret.json @@ -0,0 +1,4 @@ +{ + "secret1": "string1", + "secret2": "string1" +} diff --git a/tests/results/test_mandatory/00_9default_information_other_variable2.json b/tests/results/test_mandatory/00_9default_information_other_variable2.json new file mode 100644 index 0000000..ba2b3b2 --- /dev/null +++ b/tests/results/test_mandatory/00_9default_information_other_variable2.json @@ -0,0 +1,4 @@ +{ + "var1": "string1", + "var2": "string1" +} diff --git a/tests/results/test_mandatory/01_6string_multi.json b/tests/results/test_mandatory/01_6string_multi.json index 60d55eb..b80ef0f 100644 --- a/tests/results/test_mandatory/01_6string_multi.json +++ b/tests/results/test_mandatory/01_6string_multi.json @@ -9,7 +9,11 @@ "string2", "string3" ], - "var3": "string1", + "var3": [ + "string1", + "string2", + "string3" + ], "var4": [ "string1", "string2", diff --git a/tests/results/test_mandatory/04_5disabled_calculation_variable_multi.json b/tests/results/test_mandatory/04_5disabled_calculation_variable_multi.json new file mode 100644 index 0000000..d8b1c5f --- /dev/null +++ b/tests/results/test_mandatory/04_5disabled_calculation_variable_multi.json @@ -0,0 +1,3 @@ +{ + "condition": true +} diff --git a/tests/results/test_mandatory/16_6exists_family.json b/tests/results/test_mandatory/16_6exists_family.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/tests/results/test_mandatory/16_6exists_family.json @@ -0,0 +1 @@ +{} diff --git a/tests/results/test_mandatory/20_9family_absolute.json b/tests/results/test_mandatory/20_9family_absolute.json new file mode 100644 index 0000000..5dfce22 --- /dev/null +++ b/tests/results/test_mandatory/20_9family_absolute.json @@ -0,0 +1,24 @@ +{ + "var1": "string1", + "family": { + "var2": "string6", + "subfamily": { + "variable": [ + "string1", + "string2", + "string3" + ] + } + }, + "family2": { + "var2": "string1", + "var3": "string5", + "subfamily": { + "variable": [ + "string1", + "string2", + "string3" + ] + } + } +} diff --git a/tests/results/test_mandatory/40_9leadership-calculation-outside-follower-first.json b/tests/results/test_mandatory/40_9leadership-calculation-outside-follower-first.json new file mode 100644 index 0000000..7b9def1 --- /dev/null +++ b/tests/results/test_mandatory/40_9leadership-calculation-outside-follower-first.json @@ -0,0 +1,24 @@ +{ + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] +} diff --git a/tests/results/test_mandatory/40_9leadership-calculation-outside-follower-last.json b/tests/results/test_mandatory/40_9leadership-calculation-outside-follower-last.json new file mode 100644 index 0000000..7b9def1 --- /dev/null +++ b/tests/results/test_mandatory/40_9leadership-calculation-outside-follower-last.json @@ -0,0 +1,24 @@ +{ + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] +} diff --git a/tests/results/test_mandatory/40_9leadership-calculation-outside-follower.json b/tests/results/test_mandatory/40_9leadership-calculation-outside-follower.json new file mode 100644 index 0000000..7b9def1 --- /dev/null +++ b/tests/results/test_mandatory/40_9leadership-calculation-outside-follower.json @@ -0,0 +1,24 @@ +{ + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] +} diff --git a/tests/results/test_mandatory/40_9leadership-calculation-outside-leader-first.json b/tests/results/test_mandatory/40_9leadership-calculation-outside-leader-first.json new file mode 100644 index 0000000..1c195c3 --- /dev/null +++ b/tests/results/test_mandatory/40_9leadership-calculation-outside-leader-first.json @@ -0,0 +1,20 @@ +{ + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": "string1" +} diff --git a/tests/results/test_mandatory/40_9leadership-calculation-outside-leader-last.json b/tests/results/test_mandatory/40_9leadership-calculation-outside-leader-last.json new file mode 100644 index 0000000..1c195c3 --- /dev/null +++ b/tests/results/test_mandatory/40_9leadership-calculation-outside-leader-last.json @@ -0,0 +1,20 @@ +{ + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": "string1" +} diff --git a/tests/results/test_mandatory/40_9leadership-calculation-outside-leader.json b/tests/results/test_mandatory/40_9leadership-calculation-outside-leader.json new file mode 100644 index 0000000..7b9def1 --- /dev/null +++ b/tests/results/test_mandatory/40_9leadership-calculation-outside-leader.json @@ -0,0 +1,24 @@ +{ + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] +} diff --git a/tests/results/test_namespace/00_6secret.json b/tests/results/test_namespace/00_6secret.json new file mode 100644 index 0000000..83be33c --- /dev/null +++ b/tests/results/test_namespace/00_6secret.json @@ -0,0 +1,6 @@ +{ + "rougail": { + "secret1": "string1", + "secret2": "string1" + } +} diff --git a/tests/results/test_namespace/00_9default_information_other_variable2.json b/tests/results/test_namespace/00_9default_information_other_variable2.json new file mode 100644 index 0000000..0b753c6 --- /dev/null +++ b/tests/results/test_namespace/00_9default_information_other_variable2.json @@ -0,0 +1,6 @@ +{ + "rougail": { + "var1": "string1", + "var2": "string1" + } +} diff --git a/tests/results/test_namespace/00_9extra_ouside.json b/tests/results/test_namespace/00_9extra_ouside.json new file mode 100644 index 0000000..d118829 --- /dev/null +++ b/tests/results/test_namespace/00_9extra_ouside.json @@ -0,0 +1,8 @@ +{ + "rougail": { + "variable": "string1" + }, + "extra": { + "variable": "string1" + } +} diff --git a/tests/results/test_namespace/01_6string_multi.json b/tests/results/test_namespace/01_6string_multi.json index 514174f..f134348 100644 --- a/tests/results/test_namespace/01_6string_multi.json +++ b/tests/results/test_namespace/01_6string_multi.json @@ -10,7 +10,11 @@ "string2", "string3" ], - "var3": "string1", + "var3": [ + "string1", + "string2", + "string3" + ], "var4": [ "string1", "string2", diff --git a/tests/results/test_namespace/04_5disabled_calculation_multi.json b/tests/results/test_namespace/04_5disabled_calculation_multi.json new file mode 100644 index 0000000..b9f79b8 --- /dev/null +++ b/tests/results/test_namespace/04_5disabled_calculation_multi.json @@ -0,0 +1,15 @@ +{ + "rougail": { + "condition": "string1", + "variable1": [ + "string1", + "string2", + "string3" + ], + "variable2": [ + "string1", + "string2", + "string3" + ] + } +} diff --git a/tests/results/test_namespace/04_5disabled_calculation_variable_multi.json b/tests/results/test_namespace/04_5disabled_calculation_variable_multi.json new file mode 100644 index 0000000..0951559 --- /dev/null +++ b/tests/results/test_namespace/04_5disabled_calculation_variable_multi.json @@ -0,0 +1,5 @@ +{ + "rougail": { + "condition": true + } +} diff --git a/tests/results/test_namespace/16_6exists_family.json b/tests/results/test_namespace/16_6exists_family.json new file mode 100644 index 0000000..33fcc8e --- /dev/null +++ b/tests/results/test_namespace/16_6exists_family.json @@ -0,0 +1,3 @@ +{ + "rougail": {} +} diff --git a/tests/results/test_namespace/40_9leadership-calculation-outside-follower-first.json b/tests/results/test_namespace/40_9leadership-calculation-outside-follower-first.json new file mode 100644 index 0000000..908fb3b --- /dev/null +++ b/tests/results/test_namespace/40_9leadership-calculation-outside-follower-first.json @@ -0,0 +1,26 @@ +{ + "rougail": { + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] + } +} diff --git a/tests/results/test_namespace/40_9leadership-calculation-outside-follower-last.json b/tests/results/test_namespace/40_9leadership-calculation-outside-follower-last.json new file mode 100644 index 0000000..908fb3b --- /dev/null +++ b/tests/results/test_namespace/40_9leadership-calculation-outside-follower-last.json @@ -0,0 +1,26 @@ +{ + "rougail": { + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] + } +} diff --git a/tests/results/test_namespace/40_9leadership-calculation-outside-follower.json b/tests/results/test_namespace/40_9leadership-calculation-outside-follower.json new file mode 100644 index 0000000..908fb3b --- /dev/null +++ b/tests/results/test_namespace/40_9leadership-calculation-outside-follower.json @@ -0,0 +1,26 @@ +{ + "rougail": { + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] + } +} diff --git a/tests/results/test_namespace/40_9leadership-calculation-outside-leader-first.json b/tests/results/test_namespace/40_9leadership-calculation-outside-leader-first.json new file mode 100644 index 0000000..d25179d --- /dev/null +++ b/tests/results/test_namespace/40_9leadership-calculation-outside-leader-first.json @@ -0,0 +1,22 @@ +{ + "rougail": { + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": "string1" + } +} diff --git a/tests/results/test_namespace/40_9leadership-calculation-outside-leader-last.json b/tests/results/test_namespace/40_9leadership-calculation-outside-leader-last.json new file mode 100644 index 0000000..d25179d --- /dev/null +++ b/tests/results/test_namespace/40_9leadership-calculation-outside-leader-last.json @@ -0,0 +1,22 @@ +{ + "rougail": { + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": "string1" + } +} diff --git a/tests/results/test_namespace/40_9leadership-calculation-outside-leader.json b/tests/results/test_namespace/40_9leadership-calculation-outside-leader.json new file mode 100644 index 0000000..908fb3b --- /dev/null +++ b/tests/results/test_namespace/40_9leadership-calculation-outside-leader.json @@ -0,0 +1,26 @@ +{ + "rougail": { + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] + } +} diff --git a/tests/results/test_namespace/60_6family_dynamic_sub_dynamic_empty2.json b/tests/results/test_namespace/60_6family_dynamic_sub_dynamic_empty2.json new file mode 100644 index 0000000..e2040a5 --- /dev/null +++ b/tests/results/test_namespace/60_6family_dynamic_sub_dynamic_empty2.json @@ -0,0 +1,52 @@ +{ + "rougail": { + "var": [ + "val1", + "val2" + ], + "dynval1": { + "var": [ + "string1", + "string2", + "string3" + ], + "dyn_string1": { + "var": "string1", + "var_identifier": "string1", + "var_identifiers": "string1" + }, + "dyn_string2": { + "var": "string1", + "var_identifier": "string1", + "var_identifiers": "string1" + }, + "dyn_string3": { + "var": "string1", + "var_identifier": "string1", + "var_identifiers": "string1" + } + }, + "dynval2": { + "var": [ + "string1", + "string2", + "string3" + ], + "dyn_string1": { + "var": "string1", + "var_identifier": "string1", + "var_identifiers": "string1" + }, + "dyn_string2": { + "var": "string1", + "var_identifier": "string1", + "var_identifiers": "string1" + }, + "dyn_string3": { + "var": "string1", + "var_identifier": "string1", + "var_identifiers": "string1" + } + } + } +} diff --git a/tests/results/test_namespace_mandatory/00_6secret.json b/tests/results/test_namespace_mandatory/00_6secret.json new file mode 100644 index 0000000..83be33c --- /dev/null +++ b/tests/results/test_namespace_mandatory/00_6secret.json @@ -0,0 +1,6 @@ +{ + "rougail": { + "secret1": "string1", + "secret2": "string1" + } +} diff --git a/tests/results/test_namespace_mandatory/00_9default_information_other_variable2.json b/tests/results/test_namespace_mandatory/00_9default_information_other_variable2.json new file mode 100644 index 0000000..0b753c6 --- /dev/null +++ b/tests/results/test_namespace_mandatory/00_9default_information_other_variable2.json @@ -0,0 +1,6 @@ +{ + "rougail": { + "var1": "string1", + "var2": "string1" + } +} diff --git a/tests/results/test_namespace_mandatory/00_9extra_ouside.json b/tests/results/test_namespace_mandatory/00_9extra_ouside.json new file mode 100644 index 0000000..d118829 --- /dev/null +++ b/tests/results/test_namespace_mandatory/00_9extra_ouside.json @@ -0,0 +1,8 @@ +{ + "rougail": { + "variable": "string1" + }, + "extra": { + "variable": "string1" + } +} diff --git a/tests/results/test_namespace_mandatory/01_6string_multi.json b/tests/results/test_namespace_mandatory/01_6string_multi.json index 514174f..f134348 100644 --- a/tests/results/test_namespace_mandatory/01_6string_multi.json +++ b/tests/results/test_namespace_mandatory/01_6string_multi.json @@ -10,7 +10,11 @@ "string2", "string3" ], - "var3": "string1", + "var3": [ + "string1", + "string2", + "string3" + ], "var4": [ "string1", "string2", diff --git a/tests/results/test_namespace_mandatory/04_5disabled_calculation_multi.json b/tests/results/test_namespace_mandatory/04_5disabled_calculation_multi.json new file mode 100644 index 0000000..b9f79b8 --- /dev/null +++ b/tests/results/test_namespace_mandatory/04_5disabled_calculation_multi.json @@ -0,0 +1,15 @@ +{ + "rougail": { + "condition": "string1", + "variable1": [ + "string1", + "string2", + "string3" + ], + "variable2": [ + "string1", + "string2", + "string3" + ] + } +} diff --git a/tests/results/test_namespace_mandatory/04_5disabled_calculation_variable_multi.json b/tests/results/test_namespace_mandatory/04_5disabled_calculation_variable_multi.json new file mode 100644 index 0000000..0951559 --- /dev/null +++ b/tests/results/test_namespace_mandatory/04_5disabled_calculation_variable_multi.json @@ -0,0 +1,5 @@ +{ + "rougail": { + "condition": true + } +} diff --git a/tests/results/test_namespace_mandatory/16_6exists_family.json b/tests/results/test_namespace_mandatory/16_6exists_family.json new file mode 100644 index 0000000..33fcc8e --- /dev/null +++ b/tests/results/test_namespace_mandatory/16_6exists_family.json @@ -0,0 +1,3 @@ +{ + "rougail": {} +} diff --git a/tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-follower-first.json b/tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-follower-first.json new file mode 100644 index 0000000..908fb3b --- /dev/null +++ b/tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-follower-first.json @@ -0,0 +1,26 @@ +{ + "rougail": { + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] + } +} diff --git a/tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-follower-last.json b/tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-follower-last.json new file mode 100644 index 0000000..908fb3b --- /dev/null +++ b/tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-follower-last.json @@ -0,0 +1,26 @@ +{ + "rougail": { + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] + } +} diff --git a/tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-follower.json b/tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-follower.json new file mode 100644 index 0000000..908fb3b --- /dev/null +++ b/tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-follower.json @@ -0,0 +1,26 @@ +{ + "rougail": { + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] + } +} diff --git a/tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-leader-first.json b/tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-leader-first.json new file mode 100644 index 0000000..d25179d --- /dev/null +++ b/tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-leader-first.json @@ -0,0 +1,22 @@ +{ + "rougail": { + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": "string1" + } +} diff --git a/tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-leader-last.json b/tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-leader-last.json new file mode 100644 index 0000000..d25179d --- /dev/null +++ b/tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-leader-last.json @@ -0,0 +1,22 @@ +{ + "rougail": { + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": "string1" + } +} diff --git a/tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-leader.json b/tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-leader.json new file mode 100644 index 0000000..908fb3b --- /dev/null +++ b/tests/results/test_namespace_mandatory/40_9leadership-calculation-outside-leader.json @@ -0,0 +1,26 @@ +{ + "rougail": { + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] + } +} diff --git a/tests/results/test_namespace_mandatory/60_6family_dynamic_sub_dynamic_empty2.json b/tests/results/test_namespace_mandatory/60_6family_dynamic_sub_dynamic_empty2.json new file mode 100644 index 0000000..e2040a5 --- /dev/null +++ b/tests/results/test_namespace_mandatory/60_6family_dynamic_sub_dynamic_empty2.json @@ -0,0 +1,52 @@ +{ + "rougail": { + "var": [ + "val1", + "val2" + ], + "dynval1": { + "var": [ + "string1", + "string2", + "string3" + ], + "dyn_string1": { + "var": "string1", + "var_identifier": "string1", + "var_identifiers": "string1" + }, + "dyn_string2": { + "var": "string1", + "var_identifier": "string1", + "var_identifiers": "string1" + }, + "dyn_string3": { + "var": "string1", + "var_identifier": "string1", + "var_identifiers": "string1" + } + }, + "dynval2": { + "var": [ + "string1", + "string2", + "string3" + ], + "dyn_string1": { + "var": "string1", + "var_identifier": "string1", + "var_identifiers": "string1" + }, + "dyn_string2": { + "var": "string1", + "var_identifier": "string1", + "var_identifiers": "string1" + }, + "dyn_string3": { + "var": "string1", + "var_identifier": "string1", + "var_identifiers": "string1" + } + } + } +} diff --git a/tests/results/test_namespace_read_write/00_6secret.json b/tests/results/test_namespace_read_write/00_6secret.json new file mode 100644 index 0000000..b916175 --- /dev/null +++ b/tests/results/test_namespace_read_write/00_6secret.json @@ -0,0 +1,6 @@ +{ + "rougail": { + "secret1": null, + "secret2": "value" + } +} diff --git a/tests/results/test_namespace_read_write/00_9default_information_other_variable2.json b/tests/results/test_namespace_read_write/00_9default_information_other_variable2.json new file mode 100644 index 0000000..10fcdcd --- /dev/null +++ b/tests/results/test_namespace_read_write/00_9default_information_other_variable2.json @@ -0,0 +1,6 @@ +{ + "rougail": { + "var1": null, + "var2": null + } +} diff --git a/tests/results/test_namespace_read_write/00_9extra_ouside.json b/tests/results/test_namespace_read_write/00_9extra_ouside.json new file mode 100644 index 0000000..ac87f3e --- /dev/null +++ b/tests/results/test_namespace_read_write/00_9extra_ouside.json @@ -0,0 +1,8 @@ +{ + "rougail": { + "variable": "value in extra" + }, + "extra": { + "variable": "value in extra" + } +} diff --git a/tests/results/test_namespace_read_write/01_6string_multi.json b/tests/results/test_namespace_read_write/01_6string_multi.json index d97c841..335ff76 100644 --- a/tests/results/test_namespace_read_write/01_6string_multi.json +++ b/tests/results/test_namespace_read_write/01_6string_multi.json @@ -2,7 +2,7 @@ "rougail": { "var1": [], "var2": [], - "var3": null, + "var3": [], "var4": [ "value" ], diff --git a/tests/results/test_namespace_read_write/04_5disabled_calculation_multi.json b/tests/results/test_namespace_read_write/04_5disabled_calculation_multi.json new file mode 100644 index 0000000..954939c --- /dev/null +++ b/tests/results/test_namespace_read_write/04_5disabled_calculation_multi.json @@ -0,0 +1,7 @@ +{ + "rougail": { + "condition": "no", + "variable1": [], + "variable2": [] + } +} diff --git a/tests/results/test_namespace_read_write/04_5disabled_calculation_variable_multi.json b/tests/results/test_namespace_read_write/04_5disabled_calculation_variable_multi.json new file mode 100644 index 0000000..a4bfb20 --- /dev/null +++ b/tests/results/test_namespace_read_write/04_5disabled_calculation_variable_multi.json @@ -0,0 +1,6 @@ +{ + "rougail": { + "condition": false, + "variable": [] + } +} diff --git a/tests/results/test_namespace_read_write/16_6exists_family.json b/tests/results/test_namespace_read_write/16_6exists_family.json new file mode 100644 index 0000000..33fcc8e --- /dev/null +++ b/tests/results/test_namespace_read_write/16_6exists_family.json @@ -0,0 +1,3 @@ +{ + "rougail": {} +} diff --git a/tests/results/test_namespace_read_write/40_9leadership-calculation-outside-follower-first.json b/tests/results/test_namespace_read_write/40_9leadership-calculation-outside-follower-first.json new file mode 100644 index 0000000..e5a8389 --- /dev/null +++ b/tests/results/test_namespace_read_write/40_9leadership-calculation-outside-follower-first.json @@ -0,0 +1,19 @@ +{ + "rougail": { + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": [ + "val11" + ] + } +} diff --git a/tests/results/test_namespace_read_write/40_9leadership-calculation-outside-follower-last.json b/tests/results/test_namespace_read_write/40_9leadership-calculation-outside-follower-last.json new file mode 100644 index 0000000..e5a8389 --- /dev/null +++ b/tests/results/test_namespace_read_write/40_9leadership-calculation-outside-follower-last.json @@ -0,0 +1,19 @@ +{ + "rougail": { + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": [ + "val11" + ] + } +} diff --git a/tests/results/test_namespace_read_write/40_9leadership-calculation-outside-follower.json b/tests/results/test_namespace_read_write/40_9leadership-calculation-outside-follower.json new file mode 100644 index 0000000..1b1f326 --- /dev/null +++ b/tests/results/test_namespace_read_write/40_9leadership-calculation-outside-follower.json @@ -0,0 +1,20 @@ +{ + "rougail": { + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": [ + "val11", + "val11" + ] + } +} diff --git a/tests/results/test_namespace_read_write/40_9leadership-calculation-outside-leader-first.json b/tests/results/test_namespace_read_write/40_9leadership-calculation-outside-leader-first.json new file mode 100644 index 0000000..c4410dd --- /dev/null +++ b/tests/results/test_namespace_read_write/40_9leadership-calculation-outside-leader-first.json @@ -0,0 +1,17 @@ +{ + "rougail": { + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": "value1" + } +} diff --git a/tests/results/test_namespace_read_write/40_9leadership-calculation-outside-leader-last.json b/tests/results/test_namespace_read_write/40_9leadership-calculation-outside-leader-last.json new file mode 100644 index 0000000..dcdb657 --- /dev/null +++ b/tests/results/test_namespace_read_write/40_9leadership-calculation-outside-leader-last.json @@ -0,0 +1,17 @@ +{ + "rougail": { + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": "value2" + } +} diff --git a/tests/results/test_namespace_read_write/40_9leadership-calculation-outside-leader.json b/tests/results/test_namespace_read_write/40_9leadership-calculation-outside-leader.json new file mode 100644 index 0000000..bc04ca3 --- /dev/null +++ b/tests/results/test_namespace_read_write/40_9leadership-calculation-outside-leader.json @@ -0,0 +1,20 @@ +{ + "rougail": { + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": [ + "value1", + "value2" + ] + } +} diff --git a/tests/results/test_namespace_read_write/60_6family_dynamic_sub_dynamic_empty2.json b/tests/results/test_namespace_read_write/60_6family_dynamic_sub_dynamic_empty2.json new file mode 100644 index 0000000..edf5c75 --- /dev/null +++ b/tests/results/test_namespace_read_write/60_6family_dynamic_sub_dynamic_empty2.json @@ -0,0 +1,14 @@ +{ + "rougail": { + "var": [ + "val1", + "val2" + ], + "dynval1": { + "var": [] + }, + "dynval2": { + "var": [] + } + } +} diff --git a/tests/results/test_namespace_read_write_mandatory/00_6secret.json b/tests/results/test_namespace_read_write_mandatory/00_6secret.json new file mode 100644 index 0000000..83be33c --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory/00_6secret.json @@ -0,0 +1,6 @@ +{ + "rougail": { + "secret1": "string1", + "secret2": "string1" + } +} diff --git a/tests/results/test_namespace_read_write_mandatory/00_9default_information_other_variable2.json b/tests/results/test_namespace_read_write_mandatory/00_9default_information_other_variable2.json new file mode 100644 index 0000000..0b753c6 --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory/00_9default_information_other_variable2.json @@ -0,0 +1,6 @@ +{ + "rougail": { + "var1": "string1", + "var2": "string1" + } +} diff --git a/tests/results/test_namespace_read_write_mandatory/00_9extra_ouside.json b/tests/results/test_namespace_read_write_mandatory/00_9extra_ouside.json new file mode 100644 index 0000000..d118829 --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory/00_9extra_ouside.json @@ -0,0 +1,8 @@ +{ + "rougail": { + "variable": "string1" + }, + "extra": { + "variable": "string1" + } +} diff --git a/tests/results/test_namespace_read_write_mandatory/01_6string_multi.json b/tests/results/test_namespace_read_write_mandatory/01_6string_multi.json index 514174f..f134348 100644 --- a/tests/results/test_namespace_read_write_mandatory/01_6string_multi.json +++ b/tests/results/test_namespace_read_write_mandatory/01_6string_multi.json @@ -10,7 +10,11 @@ "string2", "string3" ], - "var3": "string1", + "var3": [ + "string1", + "string2", + "string3" + ], "var4": [ "string1", "string2", diff --git a/tests/results/test_namespace_read_write_mandatory/04_5disabled_calculation_multi.json b/tests/results/test_namespace_read_write_mandatory/04_5disabled_calculation_multi.json new file mode 100644 index 0000000..b9f79b8 --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory/04_5disabled_calculation_multi.json @@ -0,0 +1,15 @@ +{ + "rougail": { + "condition": "string1", + "variable1": [ + "string1", + "string2", + "string3" + ], + "variable2": [ + "string1", + "string2", + "string3" + ] + } +} diff --git a/tests/results/test_namespace_read_write_mandatory/04_5disabled_calculation_variable_multi.json b/tests/results/test_namespace_read_write_mandatory/04_5disabled_calculation_variable_multi.json new file mode 100644 index 0000000..0951559 --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory/04_5disabled_calculation_variable_multi.json @@ -0,0 +1,5 @@ +{ + "rougail": { + "condition": true + } +} diff --git a/tests/results/test_namespace_read_write_mandatory/16_6exists_family.json b/tests/results/test_namespace_read_write_mandatory/16_6exists_family.json new file mode 100644 index 0000000..33fcc8e --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory/16_6exists_family.json @@ -0,0 +1,3 @@ +{ + "rougail": {} +} diff --git a/tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-follower-first.json b/tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-follower-first.json new file mode 100644 index 0000000..908fb3b --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-follower-first.json @@ -0,0 +1,26 @@ +{ + "rougail": { + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] + } +} diff --git a/tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-follower-last.json b/tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-follower-last.json new file mode 100644 index 0000000..908fb3b --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-follower-last.json @@ -0,0 +1,26 @@ +{ + "rougail": { + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] + } +} diff --git a/tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-follower.json b/tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-follower.json new file mode 100644 index 0000000..908fb3b --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-follower.json @@ -0,0 +1,26 @@ +{ + "rougail": { + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] + } +} diff --git a/tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-leader-first.json b/tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-leader-first.json new file mode 100644 index 0000000..d25179d --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-leader-first.json @@ -0,0 +1,22 @@ +{ + "rougail": { + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": "string1" + } +} diff --git a/tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-leader-last.json b/tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-leader-last.json new file mode 100644 index 0000000..d25179d --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-leader-last.json @@ -0,0 +1,22 @@ +{ + "rougail": { + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": "string1" + } +} diff --git a/tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-leader.json b/tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-leader.json new file mode 100644 index 0000000..908fb3b --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory/40_9leadership-calculation-outside-leader.json @@ -0,0 +1,26 @@ +{ + "rougail": { + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] + } +} diff --git a/tests/results/test_namespace_read_write_mandatory/60_6family_dynamic_sub_dynamic_empty2.json b/tests/results/test_namespace_read_write_mandatory/60_6family_dynamic_sub_dynamic_empty2.json new file mode 100644 index 0000000..e2040a5 --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory/60_6family_dynamic_sub_dynamic_empty2.json @@ -0,0 +1,52 @@ +{ + "rougail": { + "var": [ + "val1", + "val2" + ], + "dynval1": { + "var": [ + "string1", + "string2", + "string3" + ], + "dyn_string1": { + "var": "string1", + "var_identifier": "string1", + "var_identifiers": "string1" + }, + "dyn_string2": { + "var": "string1", + "var_identifier": "string1", + "var_identifiers": "string1" + }, + "dyn_string3": { + "var": "string1", + "var_identifier": "string1", + "var_identifiers": "string1" + } + }, + "dynval2": { + "var": [ + "string1", + "string2", + "string3" + ], + "dyn_string1": { + "var": "string1", + "var_identifier": "string1", + "var_identifiers": "string1" + }, + "dyn_string2": { + "var": "string1", + "var_identifier": "string1", + "var_identifiers": "string1" + }, + "dyn_string3": { + "var": "string1", + "var_identifier": "string1", + "var_identifiers": "string1" + } + } + } +} diff --git a/tests/results/test_namespace_read_write_mandatory_errors/00_6secret.json b/tests/results/test_namespace_read_write_mandatory_errors/00_6secret.json new file mode 100644 index 0000000..702ce87 --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory_errors/00_6secret.json @@ -0,0 +1,6 @@ +{ + "_errors": [ + "The following variables are mandatory but have no value:", + " - rougail.secret1 (the first variable)" + ] +} diff --git a/tests/results/test_namespace_read_write_mandatory_errors/00_9default_information_other_variable2.json b/tests/results/test_namespace_read_write_mandatory_errors/00_9default_information_other_variable2.json new file mode 100644 index 0000000..17db2f1 --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory_errors/00_9default_information_other_variable2.json @@ -0,0 +1,7 @@ +{ + "_errors": [ + "The following variables are mandatory but have no value:", + " - rougail.var1 (a first variable)", + " - rougail.var2 (a second variable)" + ] +} diff --git a/tests/results/test_namespace_read_write_mandatory_errors/00_9extra_ouside.json b/tests/results/test_namespace_read_write_mandatory_errors/00_9extra_ouside.json new file mode 100644 index 0000000..ac87f3e --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory_errors/00_9extra_ouside.json @@ -0,0 +1,8 @@ +{ + "rougail": { + "variable": "value in extra" + }, + "extra": { + "variable": "value in extra" + } +} diff --git a/tests/results/test_namespace_read_write_mandatory_errors/04_5disabled_calculation_multi.json b/tests/results/test_namespace_read_write_mandatory_errors/04_5disabled_calculation_multi.json new file mode 100644 index 0000000..a61c170 --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory_errors/04_5disabled_calculation_multi.json @@ -0,0 +1,7 @@ +{ + "_errors": [ + "The following variables are mandatory but have no value:", + " - rougail.variable1 (a first variable)", + " - rougail.variable2 (a second variable)" + ] +} diff --git a/tests/results/test_namespace_read_write_mandatory_errors/04_5disabled_calculation_variable_multi.json b/tests/results/test_namespace_read_write_mandatory_errors/04_5disabled_calculation_variable_multi.json new file mode 100644 index 0000000..3f6c63f --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory_errors/04_5disabled_calculation_variable_multi.json @@ -0,0 +1,6 @@ +{ + "_errors": [ + "The following variables are mandatory but have no value:", + " - rougail.variable (a variable)" + ] +} diff --git a/tests/results/test_namespace_read_write_mandatory_errors/16_6exists_family.json b/tests/results/test_namespace_read_write_mandatory_errors/16_6exists_family.json new file mode 100644 index 0000000..33fcc8e --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory_errors/16_6exists_family.json @@ -0,0 +1,3 @@ +{ + "rougail": {} +} diff --git a/tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-follower-first.json b/tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-follower-first.json new file mode 100644 index 0000000..e5a8389 --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-follower-first.json @@ -0,0 +1,19 @@ +{ + "rougail": { + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": [ + "val11" + ] + } +} diff --git a/tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-follower-last.json b/tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-follower-last.json new file mode 100644 index 0000000..e5a8389 --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-follower-last.json @@ -0,0 +1,19 @@ +{ + "rougail": { + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": [ + "val11" + ] + } +} diff --git a/tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-follower.json b/tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-follower.json new file mode 100644 index 0000000..1b1f326 --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-follower.json @@ -0,0 +1,20 @@ +{ + "rougail": { + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": [ + "val11", + "val11" + ] + } +} diff --git a/tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-leader-first.json b/tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-leader-first.json new file mode 100644 index 0000000..c4410dd --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-leader-first.json @@ -0,0 +1,17 @@ +{ + "rougail": { + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": "value1" + } +} diff --git a/tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-leader-last.json b/tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-leader-last.json new file mode 100644 index 0000000..dcdb657 --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-leader-last.json @@ -0,0 +1,17 @@ +{ + "rougail": { + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": "value2" + } +} diff --git a/tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-leader.json b/tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-leader.json new file mode 100644 index 0000000..bc04ca3 --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory_errors/40_9leadership-calculation-outside-leader.json @@ -0,0 +1,20 @@ +{ + "rougail": { + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": [ + "value1", + "value2" + ] + } +} diff --git a/tests/results/test_namespace_read_write_mandatory_errors/60_6family_dynamic_sub_dynamic_empty2.json b/tests/results/test_namespace_read_write_mandatory_errors/60_6family_dynamic_sub_dynamic_empty2.json new file mode 100644 index 0000000..edf5c75 --- /dev/null +++ b/tests/results/test_namespace_read_write_mandatory_errors/60_6family_dynamic_sub_dynamic_empty2.json @@ -0,0 +1,14 @@ +{ + "rougail": { + "var": [ + "val1", + "val2" + ], + "dynval1": { + "var": [] + }, + "dynval2": { + "var": [] + } + } +} diff --git a/tests/results/test_read_write/00_6secret.json b/tests/results/test_read_write/00_6secret.json new file mode 100644 index 0000000..6161427 --- /dev/null +++ b/tests/results/test_read_write/00_6secret.json @@ -0,0 +1,4 @@ +{ + "secret1": null, + "secret2": "value" +} diff --git a/tests/results/test_read_write/00_9default_information_other_variable2.json b/tests/results/test_read_write/00_9default_information_other_variable2.json new file mode 100644 index 0000000..849cdbe --- /dev/null +++ b/tests/results/test_read_write/00_9default_information_other_variable2.json @@ -0,0 +1,4 @@ +{ + "var1": null, + "var2": null +} diff --git a/tests/results/test_read_write/01_6string_multi.json b/tests/results/test_read_write/01_6string_multi.json index 301f314..e44c74c 100644 --- a/tests/results/test_read_write/01_6string_multi.json +++ b/tests/results/test_read_write/01_6string_multi.json @@ -1,7 +1,7 @@ { "var1": [], "var2": [], - "var3": null, + "var3": [], "var4": [ "value" ], diff --git a/tests/results/test_read_write/04_5disabled_calculation_variable_multi.json b/tests/results/test_read_write/04_5disabled_calculation_variable_multi.json new file mode 100644 index 0000000..bbb8e6d --- /dev/null +++ b/tests/results/test_read_write/04_5disabled_calculation_variable_multi.json @@ -0,0 +1,4 @@ +{ + "condition": false, + "variable": [] +} diff --git a/tests/results/test_read_write/16_6exists_family.json b/tests/results/test_read_write/16_6exists_family.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/tests/results/test_read_write/16_6exists_family.json @@ -0,0 +1 @@ +{} diff --git a/tests/results/test_read_write/20_9family_absolute.json b/tests/results/test_read_write/20_9family_absolute.json new file mode 100644 index 0000000..3e0d4a1 --- /dev/null +++ b/tests/results/test_read_write/20_9family_absolute.json @@ -0,0 +1,23 @@ +{ + "var1": null, + "family": { + "var2": null, + "subfamily": { + "variable": [ + null, + null + ] + } + }, + "family2": { + "var2": null, + "var3": "string4", + "subfamily": { + "variable": [ + null, + null, + "string4" + ] + } + } +} diff --git a/tests/results/test_read_write/40_9leadership-calculation-outside-follower-first.json b/tests/results/test_read_write/40_9leadership-calculation-outside-follower-first.json new file mode 100644 index 0000000..f546ce4 --- /dev/null +++ b/tests/results/test_read_write/40_9leadership-calculation-outside-follower-first.json @@ -0,0 +1,17 @@ +{ + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": [ + "val11" + ] +} diff --git a/tests/results/test_read_write/40_9leadership-calculation-outside-follower-last.json b/tests/results/test_read_write/40_9leadership-calculation-outside-follower-last.json new file mode 100644 index 0000000..f546ce4 --- /dev/null +++ b/tests/results/test_read_write/40_9leadership-calculation-outside-follower-last.json @@ -0,0 +1,17 @@ +{ + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": [ + "val11" + ] +} diff --git a/tests/results/test_read_write/40_9leadership-calculation-outside-follower.json b/tests/results/test_read_write/40_9leadership-calculation-outside-follower.json new file mode 100644 index 0000000..6d42ca2 --- /dev/null +++ b/tests/results/test_read_write/40_9leadership-calculation-outside-follower.json @@ -0,0 +1,18 @@ +{ + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": [ + "val11", + "val11" + ] +} diff --git a/tests/results/test_read_write/40_9leadership-calculation-outside-leader-first.json b/tests/results/test_read_write/40_9leadership-calculation-outside-leader-first.json new file mode 100644 index 0000000..a1e4460 --- /dev/null +++ b/tests/results/test_read_write/40_9leadership-calculation-outside-leader-first.json @@ -0,0 +1,15 @@ +{ + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": "value1" +} diff --git a/tests/results/test_read_write/40_9leadership-calculation-outside-leader-last.json b/tests/results/test_read_write/40_9leadership-calculation-outside-leader-last.json new file mode 100644 index 0000000..fb47695 --- /dev/null +++ b/tests/results/test_read_write/40_9leadership-calculation-outside-leader-last.json @@ -0,0 +1,15 @@ +{ + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": "value2" +} diff --git a/tests/results/test_read_write/40_9leadership-calculation-outside-leader.json b/tests/results/test_read_write/40_9leadership-calculation-outside-leader.json new file mode 100644 index 0000000..084d3de --- /dev/null +++ b/tests/results/test_read_write/40_9leadership-calculation-outside-leader.json @@ -0,0 +1,18 @@ +{ + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": [ + "value1", + "value2" + ] +} diff --git a/tests/results/test_read_write_mandatory/00_6secret.json b/tests/results/test_read_write_mandatory/00_6secret.json new file mode 100644 index 0000000..179dc87 --- /dev/null +++ b/tests/results/test_read_write_mandatory/00_6secret.json @@ -0,0 +1,4 @@ +{ + "secret1": "string1", + "secret2": "string1" +} diff --git a/tests/results/test_read_write_mandatory/00_9default_information_other_variable2.json b/tests/results/test_read_write_mandatory/00_9default_information_other_variable2.json new file mode 100644 index 0000000..ba2b3b2 --- /dev/null +++ b/tests/results/test_read_write_mandatory/00_9default_information_other_variable2.json @@ -0,0 +1,4 @@ +{ + "var1": "string1", + "var2": "string1" +} diff --git a/tests/results/test_read_write_mandatory/01_6string_multi.json b/tests/results/test_read_write_mandatory/01_6string_multi.json index 60d55eb..b80ef0f 100644 --- a/tests/results/test_read_write_mandatory/01_6string_multi.json +++ b/tests/results/test_read_write_mandatory/01_6string_multi.json @@ -9,7 +9,11 @@ "string2", "string3" ], - "var3": "string1", + "var3": [ + "string1", + "string2", + "string3" + ], "var4": [ "string1", "string2", diff --git a/tests/results/test_read_write_mandatory/04_5disabled_calculation_variable_multi.json b/tests/results/test_read_write_mandatory/04_5disabled_calculation_variable_multi.json new file mode 100644 index 0000000..d8b1c5f --- /dev/null +++ b/tests/results/test_read_write_mandatory/04_5disabled_calculation_variable_multi.json @@ -0,0 +1,3 @@ +{ + "condition": true +} diff --git a/tests/results/test_read_write_mandatory/16_6exists_family.json b/tests/results/test_read_write_mandatory/16_6exists_family.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/tests/results/test_read_write_mandatory/16_6exists_family.json @@ -0,0 +1 @@ +{} diff --git a/tests/results/test_read_write_mandatory/20_9family_absolute.json b/tests/results/test_read_write_mandatory/20_9family_absolute.json new file mode 100644 index 0000000..5dfce22 --- /dev/null +++ b/tests/results/test_read_write_mandatory/20_9family_absolute.json @@ -0,0 +1,24 @@ +{ + "var1": "string1", + "family": { + "var2": "string6", + "subfamily": { + "variable": [ + "string1", + "string2", + "string3" + ] + } + }, + "family2": { + "var2": "string1", + "var3": "string5", + "subfamily": { + "variable": [ + "string1", + "string2", + "string3" + ] + } + } +} diff --git a/tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-follower-first.json b/tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-follower-first.json new file mode 100644 index 0000000..7b9def1 --- /dev/null +++ b/tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-follower-first.json @@ -0,0 +1,24 @@ +{ + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] +} diff --git a/tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-follower-last.json b/tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-follower-last.json new file mode 100644 index 0000000..7b9def1 --- /dev/null +++ b/tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-follower-last.json @@ -0,0 +1,24 @@ +{ + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] +} diff --git a/tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-follower.json b/tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-follower.json new file mode 100644 index 0000000..7b9def1 --- /dev/null +++ b/tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-follower.json @@ -0,0 +1,24 @@ +{ + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] +} diff --git a/tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-leader-first.json b/tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-leader-first.json new file mode 100644 index 0000000..1c195c3 --- /dev/null +++ b/tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-leader-first.json @@ -0,0 +1,20 @@ +{ + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": "string1" +} diff --git a/tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-leader-last.json b/tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-leader-last.json new file mode 100644 index 0000000..1c195c3 --- /dev/null +++ b/tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-leader-last.json @@ -0,0 +1,20 @@ +{ + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": "string1" +} diff --git a/tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-leader.json b/tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-leader.json new file mode 100644 index 0000000..7b9def1 --- /dev/null +++ b/tests/results/test_read_write_mandatory/40_9leadership-calculation-outside-leader.json @@ -0,0 +1,24 @@ +{ + "leader": [ + { + "leader": "string1", + "follower1": "string1", + "follower2": "string1" + }, + { + "leader": "string2", + "follower1": "string2", + "follower2": "string2" + }, + { + "leader": "string3", + "follower1": "string3", + "follower2": "string3" + } + ], + "calculate": [ + "string1", + "string2", + "string3" + ] +} diff --git a/tests/results/test_read_write_mandatory_errors/00_6secret.json b/tests/results/test_read_write_mandatory_errors/00_6secret.json new file mode 100644 index 0000000..da31b68 --- /dev/null +++ b/tests/results/test_read_write_mandatory_errors/00_6secret.json @@ -0,0 +1,6 @@ +{ + "_errors": [ + "The following variables are mandatory but have no value:", + " - secret1 (the first variable)" + ] +} diff --git a/tests/results/test_read_write_mandatory_errors/00_9default_information_other_variable2.json b/tests/results/test_read_write_mandatory_errors/00_9default_information_other_variable2.json new file mode 100644 index 0000000..7361b1a --- /dev/null +++ b/tests/results/test_read_write_mandatory_errors/00_9default_information_other_variable2.json @@ -0,0 +1,7 @@ +{ + "_errors": [ + "The following variables are mandatory but have no value:", + " - var1 (a first variable)", + " - var2 (a second variable)" + ] +} diff --git a/tests/results/test_read_write_mandatory_errors/04_5disabled_calculation_variable_multi.json b/tests/results/test_read_write_mandatory_errors/04_5disabled_calculation_variable_multi.json new file mode 100644 index 0000000..f51dcb9 --- /dev/null +++ b/tests/results/test_read_write_mandatory_errors/04_5disabled_calculation_variable_multi.json @@ -0,0 +1,6 @@ +{ + "_errors": [ + "The following variables are mandatory but have no value:", + " - variable (a variable)" + ] +} diff --git a/tests/results/test_read_write_mandatory_errors/16_6exists_family.json b/tests/results/test_read_write_mandatory_errors/16_6exists_family.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/tests/results/test_read_write_mandatory_errors/16_6exists_family.json @@ -0,0 +1 @@ +{} diff --git a/tests/results/test_read_write_mandatory_errors/20_9family_absolute.json b/tests/results/test_read_write_mandatory_errors/20_9family_absolute.json new file mode 100644 index 0000000..d27eaa7 --- /dev/null +++ b/tests/results/test_read_write_mandatory_errors/20_9family_absolute.json @@ -0,0 +1,10 @@ +{ + "_errors": [ + "The following variables are mandatory but have no value:", + " - var1 (first variable)", + " - family.var2 (a second variable)", + " - family.subfamily.variable (third variable)", + " - family2.var2 (a variable2)", + " - family2.subfamily.variable (fourth variable)" + ] +} diff --git a/tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-follower-first.json b/tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-follower-first.json new file mode 100644 index 0000000..f546ce4 --- /dev/null +++ b/tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-follower-first.json @@ -0,0 +1,17 @@ +{ + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": [ + "val11" + ] +} diff --git a/tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-follower-last.json b/tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-follower-last.json new file mode 100644 index 0000000..f546ce4 --- /dev/null +++ b/tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-follower-last.json @@ -0,0 +1,17 @@ +{ + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": [ + "val11" + ] +} diff --git a/tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-follower.json b/tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-follower.json new file mode 100644 index 0000000..6d42ca2 --- /dev/null +++ b/tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-follower.json @@ -0,0 +1,18 @@ +{ + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": [ + "val11", + "val11" + ] +} diff --git a/tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-leader-first.json b/tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-leader-first.json new file mode 100644 index 0000000..a1e4460 --- /dev/null +++ b/tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-leader-first.json @@ -0,0 +1,15 @@ +{ + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": "value1" +} diff --git a/tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-leader-last.json b/tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-leader-last.json new file mode 100644 index 0000000..fb47695 --- /dev/null +++ b/tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-leader-last.json @@ -0,0 +1,15 @@ +{ + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": "value2" +} diff --git a/tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-leader.json b/tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-leader.json new file mode 100644 index 0000000..084d3de --- /dev/null +++ b/tests/results/test_read_write_mandatory_errors/40_9leadership-calculation-outside-leader.json @@ -0,0 +1,18 @@ +{ + "leader": [ + { + "leader": "value1", + "follower1": "val11", + "follower2": "val21" + }, + { + "leader": "value2", + "follower1": "val11", + "follower2": "val21" + } + ], + "calculate": [ + "value1", + "value2" + ] +} diff --git a/tests/test_load.py b/tests/test_load.py index c4df791..15db088 100644 --- a/tests/test_load.py +++ b/tests/test_load.py @@ -56,7 +56,7 @@ def _test_dictionaries(test_dir, namespace, ext, *, read_write=True, mandatory=F if do_calc and (mandatory or not read_write): get_values_for_config(config) ################################## - generated_output = RougailOutput(config, rougailconfig=rougailconfig).run() + generated_output = RougailOutput(config, rougailconfig=rougailconfig).run()[1] output_file = Path(__file__).parent / 'results' / dir_name / (test_dir.name + "." + ext) if not output_file.is_file(): if not output_file.parent.is_dir():