Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test tools update #69

Merged
merged 1 commit into from
Nov 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion tools/test/cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,16 @@ export SHOW_CONFIG_TOOLS=${CLIBUILD}/render-templates
export CLISH_PATH=${CLIBUILD}/command-tree

# KLISH_BIN can be set to use klish exe and libs from other directory.
[[ ! -d "${KLISH_BIN}" ]] && KLISH_BIN=${CLIBUILD}
if [[ -z ${KLISH_BIN} ]]; then
if [[ -f ${CLIBUILD}/clish ]]; then
KLISH_BIN=${CLIBUILD}
elif [[ -f ${BUILDDIR}/target/clish ]]; then
KLISH_BIN=${BUILDDIR}/target
else
echo "Error: could not locate clish."
exit 1
fi
fi

PYTHONPATH+=:${CLISOURCE}/actioner
PYTHONPATH+=:${CLISOURCE}/renderer
Expand Down
2 changes: 2 additions & 0 deletions tools/test/rest-gotest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ MGMT_COMMON_DIR=$(realpath ${TOPDIR}/../sonic-mgmt-common)

export CVL_SCHEMA_PATH=${MGMT_COMMON_DIR}/build/cvl/schema

export DB_CONFIG_PATH=${MGMT_COMMON_DIR}/tools/test/database_config.json

PKG="github.com/Azure/sonic-mgmt-framework/rest/server"
DIR="${PWD}"

Expand Down
6 changes: 6 additions & 0 deletions tools/test/rest-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,15 @@ for V in $@; do
case $V in
-cert|--cert|-cert=*|--cert=*) HAS_CRTFILE=1;;
-key|--key|-key=*|--key=*) HAS_KEYFILE=1;;
-v|--v|-v=*|--v=*) HAS_V=1;;
-client_auth|--client_auth) HAS_AUTH=1;;
-client_auth=*|--client_auth=*) HAS_AUTH=1;;
esac
done

[[ -z ${HAS_V} ]] && EXTRA_ARGS+=" -v 1"
[[ -z ${HAS_AUTH} ]] && EXTRA_ARGS+=" -client_auth none"

cd $SERVER_DIR

##
Expand Down