summaryrefslogtreecommitdiff
path: root/validation
diff options
context:
space:
mode:
authorJean-Philippe NOEL2013-04-24 19:03:23 +0200
committerJean-Philippe NOEL2013-05-24 10:12:36 +0200
commite4649cd7b855a1c632a1c0c9100bf3820616b8e7 (patch)
tree46925ff0fcedc28b1ba751e61eb39d65bff8ed1c /validation
parentc0b319524a3a1596cdea4e922f2db6b352d61813 (diff)
validation/test/P2P_throughput: add test to validate the configs, refs #4001
Diffstat (limited to 'validation')
-rw-r--r--validation/test/P2P_throughput/P2P_throughput.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/validation/test/P2P_throughput/P2P_throughput.py b/validation/test/P2P_throughput/P2P_throughput.py
index bdbb525643..aaaca466f1 100644
--- a/validation/test/P2P_throughput/P2P_throughput.py
+++ b/validation/test/P2P_throughput/P2P_throughput.py
@@ -780,3 +780,18 @@ if __name__ == "__main__":
assert " * label1: text1\n\n * label2: text2\n\n" == rst_params([("label1", "text1"), ("label2", "text2")])
+ def test_configs():
+ dirname = os.path.dirname(__file__)
+ template_config_file_path = os.path.join(dirname, "config.py")
+ configs_dirname = os.path.join(dirname, "configs")
+ for file_name in os.listdir(configs_dirname):
+ if os.path.splitext(file_name)[1] == ".py":
+ config_file_path = os.path.join(configs_dirname, file_name)
+ new_config = config_utils.get_config(None,
+ template_config_file_path,
+ config_file_path)
+ assert new_config["parent"] is None
+ assert len(new_config["power_strip"].keys()) == 1
+ update_config(new_config)
+
+ test_configs()