forked from DLTcollab/tangle-accelerator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request DLTcollab#730 from splasky/fix_test_input
fix(Endpoint): Specify host info from CLI
- Loading branch information
Showing
3 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
#!/usr/bin/env bash | ||
# Usage: ./test-endpoint.sh [HOST or IP] [PORT] | ||
|
||
if [ "$#" -ne 2 ]; then | ||
echo "Usage: ./test-endpoint.sh [HOST or IP] [PORT]" >&2 | ||
exit 1 | ||
fi | ||
|
||
set -euo pipefail | ||
|
||
COMMON_FILE="tests/endpoint/common.sh" | ||
|
||
if [ ! -f "$COMMON_FILE" ]; then | ||
echo "$COMMON_FILE is not exists." | ||
exit 1 | ||
fi | ||
source $COMMON_FILE | ||
|
||
# Check ip is validity or not | ||
validate_host "$1" | ||
validate_port "$2" | ||
|
||
# Create endpoint app | ||
make EP_TA_HOST=node.deviceproof.org EP_TA_PORT=5566 legato | ||
make EP_TA_HOST="$1" EP_TA_PORT="$2" legato | ||
|
||
# Run endpoint app test here | ||
endpoint/_build_endpoint/localhost/app/endpoint/staging/read-only/bin/endpoint |