tests: use jq to test json correctness

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
Nikos Mavrogiannopoulos
2026-01-02 11:17:58 +01:00
parent ef075f6b83
commit 5fad4f93dd
2 changed files with 10 additions and 10 deletions

View File

@@ -41,7 +41,7 @@ apt-get install -y libpam0g-dev liblz4-dev libseccomp-dev \
libprotobuf-c-dev libtalloc-dev libllhttp-dev protobuf-c-compiler \
gperf iperf3 lcov libuid-wrapper libpam-wrapper libnss-wrapper \
libsocket-wrapper gss-ntlmssp haproxy iputils-ping freeradius \
gawk gnutls-bin iproute2 yajl-tools tcpdump ipcalc
gawk gnutls-bin iproute2 jq tcpdump ipcalc
# For manpages
apt-get install -y ronn
```
@@ -58,7 +58,7 @@ yum install -y pam-devel lz4-devel libseccomp-devel \
jansson-devel liboath-devel protobuf-c-devel libtalloc-devel \
llhttp-devel protobuf-c gperf iperf3 lcov uid_wrapper \
pam_wrapper nss_wrapper socket_wrapper gssntlmssp haproxy iputils \
freeradius gawk gnutls-utils iproute yajl tcpdump
freeradius gawk gnutls-utils iproute jq tcpdump
# For manpages
yum install -y rubygem-ronn-ng
```

View File

@@ -92,7 +92,7 @@ if test $? != 0;then
exit 1
fi
json_verify <${OUTFILE}
jq . ${OUTFILE}
if test $? != 0;then
echo "occtl show users json invalid"
exit 1
@@ -104,7 +104,7 @@ if test $? != 0;then
exit 1
fi
json_verify <${OUTFILE}
jq . ${OUTFILE}
if test $? != 0;then
echo "occtl show users --debug json invalid"
exit 1
@@ -116,7 +116,7 @@ if test $? != 0;then
exit 1
fi
json_verify <${OUTFILE}
jq . ${OUTFILE}
if test $? != 0;then
echo "occtl show user json invalid"
exit 1
@@ -128,7 +128,7 @@ if test $? != 0;then
exit 1
fi
json_verify <${OUTFILE}
jq . ${OUTFILE}
if test $? != 0;then
echo "occtl show user --debug json invalid"
exit 1
@@ -140,7 +140,7 @@ if test $? != 0;then
exit 1
fi
json_verify <${OUTFILE}
jq . ${OUTFILE}
if test $? != 0;then
echo "occtl show status json invalid"
exit 1
@@ -152,7 +152,7 @@ if test $? != 0;then
exit 1
fi
json_verify <${OUTFILE}
jq . ${OUTFILE}
if test $? != 0;then
echo "occtl show status --debug json invalid"
exit 1
@@ -164,7 +164,7 @@ if test $? != 0;then
exit 1
fi
json_verify <${OUTFILE}
jq . ${OUTFILE}
if test $? != 0;then
echo "occtl show session all json invalid"
exit 1
@@ -176,7 +176,7 @@ if test $? != 0;then
exit 1
fi
json_verify <${OUTFILE}
jq . ${OUTFILE}
if test $? != 0;then
echo "occtl show session all --debug json invalid"
exit 1