From 9617cad4a01711dab6dedcd5fa184a874d545928 Mon Sep 17 00:00:00 2001 From: Raphael Bauduin Date: Tue, 26 May 2015 10:30:56 -0700 Subject: [PATCH] added docs, validation desc attribute, and more explicit message in case of FAIL --- src/mpValidations.py | 2 +- src/tests/base/validation.yml | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mpValidations.py b/src/mpValidations.py index d3e0205..804c242 100644 --- a/src/mpValidations.py +++ b/src/mpValidations.py @@ -74,7 +74,7 @@ class TcptraceTest: if tester.validate(tested_value): self.logs=self.logs+ ("" if self.logs=="" else "\n ")+ " -" +tester.name()+" OK\n" else: - self.logs=self.logs+ ("" if self.logs=="" else "\n ")+ " -" +tester.name()+" FAILS\n" + self.logs=self.logs+ ("" if self.logs=="" else "\n ")+ " -" +tester.name()+" FAILS "+ val["desc"] +"\n" is_ok = False return is_ok def name(self): diff --git a/src/tests/base/validation.yml b/src/tests/base/validation.yml index 423d9fc..6949102 100644 --- a/src/tests/base/validation.yml +++ b/src/tests/base/validation.yml @@ -8,14 +8,18 @@ tcptrace: target: 4 desc: "Open maximum 4 flows" - name: "exact_value" - target: 4 + target: 5 desc: "Open exactly 4 flows" + # This tests the flows opened by the connection. See class FlowsTest - test: "flows" validations: + # validates time between first packets of the first stream and the stream for which the index is passed. - name: "min_delay" index: 1 target: 2 desc: "Minimum 2 seconds delay between opening of first and second flow" + # validates time between first packets of streams for which the index is passed. + # index is now a compound value, handled by the validate method of the class MinDelayBetweenValidation - name: "min_delay_between" index: - 1