This repository has been archived by the owner on Apr 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jiahao Huang
authored
Nov 7, 2023
1 parent
80ad4e3
commit c98350d
Showing
4 changed files
with
63 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Run CCNP E2E test | ||
on: | ||
schedule: | ||
- cron: '25 7 * * *' | ||
workflow_dispatch: | ||
jobs: | ||
E2E_test: | ||
runs-on: tdvm-ut | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4.1.1 | ||
- name: Set up test environment | ||
run: | | ||
./test/e2e-test/ci-setup.sh | ||
- name: Run Test | ||
run: | | ||
./test/e2e-test/ci-e2e-test.sh | ||
- name: Clean up the environment | ||
if: always() | ||
run: | | ||
./test/e2e-test/ci-clean.sh |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
set -o errexit | ||
|
||
CLUSTER_NAME=my-cluster | ||
REG_NAME=kind-registry | ||
DEVICE_PLUGIN=localhost:5001/ccnp-device-plugin:0.1 | ||
QUOTE=localhost:5001/ccnp-quote-server:0.1 | ||
MEASUREMENT=localhost:5001/ccnp_measurement_server:0.1 | ||
EVENTLOG=localhost:5001/ccnp_eventlog_server:0.1 | ||
|
||
kind delete cluster --name $CLUSTER_NAME | ||
rm /run/ccnp/uds/* | ||
docker stop $REG_NAME | ||
docker rm $REG_NAME | ||
sleep 1m | ||
docker rmi ${DEVICE_PLUGIN} ${QUOTE} ${MEASUREMENT} ${EVENTLOG} | ||
for i in $(docker images | grep "none" | awk '{print $3}');do | ||
docker rmi "$i" | ||
done | ||
pip uninstall -y ccnp |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
set -o errexit | ||
: ' | ||
This is an E2E test script. | ||
If you want to run the script , please run the ci-setup.sh script in advance to set up the ci test environment. | ||
' | ||
|
||
WORK_DIR=$(cd "$(dirname "$0")"; pwd) | ||
|
||
#Run E2E test cases | ||
pip install pytest pytdxattest | ||
pytest "${WORK_DIR}/test_eventlog.py" "${WORK_DIR}/test_tdquote.py" "${WORK_DIR}/test_tdreport.py" | ||
|
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