summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2021-08-03 00:24:08 +0200
committerChristian Hopps <chopps@labn.net>2021-08-03 11:07:49 +0200
commit269a822be49b2bd7f8304f0335fc48a490e00dd0 (patch)
treec0f7bc5a4811721588226627dbc72bb2e7d8bb8b /tests
parentMerge pull request #9244 from LabNConsulting/chopps/fix-bgp-list-test (diff)
downloadfrr-269a822be49b2bd7f8304f0335fc48a490e00dd0.tar.xz
frr-269a822be49b2bd7f8304f0335fc48a490e00dd0.zip
tests: dump the actual json values to log
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'tests')
-rw-r--r--tests/topotests/lib/common_config.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py
index 07bb5153a..7a0062989 100644
--- a/tests/topotests/lib/common_config.py
+++ b/tests/topotests/lib/common_config.py
@@ -30,6 +30,7 @@ from functools import wraps
from re import search as re_search
from tempfile import mkdtemp
+import json
import os
import sys
import traceback
@@ -235,14 +236,12 @@ def run_frr_cmd(rnode, cmd, isjson=False):
if True:
if isjson:
- logger.debug(ret_data)
- print_data = rnode.vtysh_cmd(cmd.rstrip("json"), isjson=False)
+ print_data = json.dumps(ret_data)
else:
print_data = ret_data
-
logger.info(
- "Output for command [ %s] on router %s:\n%s",
- cmd.rstrip("json"),
+ "Output for command [%s] on router %s:\n%s",
+ cmd,
rnode.name,
print_data,
)