diff options
author | Todd Malsbary <todd.malsbary@intel.com> | 2021-06-17 17:06:58 -0700 |
---|---|---|
committer | Todd Malsbary <todd.malsbary@intel.com> | 2021-06-17 17:11:43 -0700 |
commit | 8d3604540bb1eefc36da8d412caf8c072872dc6e (patch) | |
tree | 492edeaf5b1a3e1b8f3c41edcc15b46b2a58e96d /kud/tests/topology-manager.sh | |
parent | dc925231a978d1ae4dce969cb4c386d4a1b0bb87 (diff) |
Fix jq null error in tests
The specific error is:
jq: error (at <stdin>:1232): null (null) cannot be parsed as a
number
Issue-ID: MULTICLOUD-1361
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Change-Id: I1821e5002260cd65ac467756753e2a2ffa01a4ce
Diffstat (limited to 'kud/tests/topology-manager.sh')
-rwxr-xr-x | kud/tests/topology-manager.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kud/tests/topology-manager.sh b/kud/tests/topology-manager.sh index 5c9f900d..77656d39 100755 --- a/kud/tests/topology-manager.sh +++ b/kud/tests/topology-manager.sh @@ -15,8 +15,8 @@ set -o pipefail source _common.sh source _functions.sh -adaptors="X710 XL710 X722" -if [[ $(lspci | grep -c "Ethernet .* \(${adaptors// /\\|}\)") == "0" ]]; then +sriov_capable_nodes=$(kubectl get nodes -o json | jq -r '.items[] | select((.status.capacity."intel.com/intel_sriov_700"!=null) and ((.status.capacity."intel.com/intel_sriov_700"|tonumber)>=2)) | .metadata.name') +if [ -z "$sriov_capable_nodes" ]; then echo "Ethernet adaptor version is not set. Topology manager test case cannot run on this machine" exit 0 else |