mirror of
https://github.com/alibaba/higress.git
synced 2026-06-26 02:35:02 +08:00
feat: support only build one plugin to testing specified WasmPlugin (#371)
Co-authored-by: 澄潭 <zty98751@alibaba-inc.com>
This commit is contained in:
@@ -19,6 +19,7 @@ Higress provides make target to run ingress api conformance tests and wasmplugin
|
|||||||
|
|
||||||
+ API Tests: `make ingress-conformance-test`
|
+ API Tests: `make ingress-conformance-test`
|
||||||
+ WasmPlugin Tests: `make ingress-wasmplugin-test`
|
+ WasmPlugin Tests: `make ingress-wasmplugin-test`
|
||||||
|
+ Only build one WasmPlugin for testing: `PLUGIN_NAME=request-block make ingress-wasmplugin-test`
|
||||||
|
|
||||||
It can be divided into below steps:
|
It can be divided into below steps:
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,19 @@ set -euo pipefail
|
|||||||
|
|
||||||
cd ./plugins/wasm-go/
|
cd ./plugins/wasm-go/
|
||||||
|
|
||||||
# developer need to declear new wasmplugins here for test
|
INNER_PLUGIN_NAME=${PLUGIN_NAME-""}
|
||||||
PLUGIN_NAME=http-call make build
|
if [ ! -n "$INNER_PLUGIN_NAME" ]; then
|
||||||
PLUGIN_NAME=request-block make build
|
EXTENSIONS_DIR=$(pwd)"/extensions/"
|
||||||
|
echo "build all wasmplugins under folder of $EXTENSIONS_DIR"
|
||||||
|
for file in `ls $EXTENSIONS_DIR`
|
||||||
|
do
|
||||||
|
if [ -d $EXTENSIONS_DIR$file ]; then
|
||||||
|
name=${file##*/}
|
||||||
|
echo "build wasmplugin name of $name"
|
||||||
|
PLUGIN_NAME=${name} make build
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo "build wasmplugin name of $INNER_PLUGIN_NAME"
|
||||||
|
PLUGIN_NAME=${INNER_PLUGIN_NAME} make build
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user