Skip to content

Commit

Permalink
Merge pull request cri-o#7087 from saschagrunert/test-cni-plugin-dir
Browse files Browse the repository at this point in the history
Try to find `CONTAINER_CNI_PLUGIN_DIR` by binary lookup
  • Loading branch information
openshift-merge-robot committed Jun 30, 2023
2 parents 3be2913 + 6b9e49d commit 56b712d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ CONTAINER_UID_MAPPINGS=${CONTAINER_UID_MAPPINGS:-}
CONTAINER_GID_MAPPINGS=${CONTAINER_GID_MAPPINGS:-}
OVERRIDE_OPTIONS=${OVERRIDE_OPTIONS:-}
# CNI path
CONTAINER_CNI_PLUGIN_DIR=${CONTAINER_CNI_PLUGIN_DIR:-/opt/cni/bin}
if command -v host-local >/dev/null; then
CONTAINER_CNI_PLUGIN_DIR=${CONTAINER_CNI_PLUGIN_DIR:-$(dirname "$(readlink "$(command -v host-local)")")}
else
CONTAINER_CNI_PLUGIN_DIR=${CONTAINER_CNI_PLUGIN_DIR:-/opt/cni/bin}
fi
# Runtime
CONTAINER_DEFAULT_RUNTIME=${CONTAINER_DEFAULT_RUNTIME:-runc}
RUNTIME_BINARY_PATH=$(command -v "$CONTAINER_DEFAULT_RUNTIME")
Expand Down

0 comments on commit 56b712d

Please sign in to comment.