Skip to content

Commit

Permalink
Create script to run all release tests. (#1106)
Browse files Browse the repository at this point in the history
* Final release test script and weekly changes.
  • Loading branch information
bnapolitan authored and SaranBalaji90 committed Aug 11, 2020
1 parent 24027a5 commit 24954f9
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 4 deletions.
102 changes: 102 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,99 @@ jobs:
- store_artifacts:
path: /tmp/cni-test

warm_ip_test:
docker:
- image: circleci/golang:1.13-stretch
working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}}
environment:
<<: *env
RUN_WARM_IP_TEST: "true"
steps:
- checkout
- setup_remote_docker
- aws-cli/setup:
profile-name: awstester
- restore_cache:
keys:
- dependency-packages-store-{{ checksum "test/integration/go.mod" }}
- dependency-packages-store-
- k8s/install-kubectl:
# requires 1.14.9 for k8s testing, since it uses log api.
kubectl-version: v1.14.9
- run:
name: Run the integration tests
command: ./scripts/run-integration-tests.sh
no_output_timeout: 15m
- save_cache:
key: dependency-packages-store-{{ checksum "test/integration/go.mod" }}
paths:
- /go/pkg
when: always
- store_artifacts:
path: /tmp/cni-test

warm_eni_test:
docker:
- image: circleci/golang:1.13-stretch
working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}}
environment:
<<: *env
RUN_WARM_ENI_TEST: "true"
steps:
- checkout
- setup_remote_docker
- aws-cli/setup:
profile-name: awstester
- restore_cache:
keys:
- dependency-packages-store-{{ checksum "test/integration/go.mod" }}
- dependency-packages-store-
- k8s/install-kubectl:
# requires 1.14.9 for k8s testing, since it uses log api.
kubectl-version: v1.14.9
- run:
name: Run the integration tests
command: ./scripts/run-integration-tests.sh
no_output_timeout: 15m
- save_cache:
key: dependency-packages-store-{{ checksum "test/integration/go.mod" }}
paths:
- /go/pkg
when: always
- store_artifacts:
path: /tmp/cni-test

bottlerocket_test:
docker:
- image: circleci/golang:1.13-stretch
working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}}
environment:
<<: *env
RUN_BOTTLEROCKET_TEST: "true"
steps:
- checkout
- setup_remote_docker
- aws-cli/setup:
profile-name: awstester
- restore_cache:
keys:
- dependency-packages-store-{{ checksum "test/integration/go.mod" }}
- dependency-packages-store-
- k8s/install-kubectl:
# requires 1.14.9 for k8s testing, since it uses log api.
kubectl-version: v1.14.9
- run:
name: Run the integration tests
command: ./scripts/run-integration-tests.sh
no_output_timeout: 20m
- save_cache:
key: dependency-packages-store-{{ checksum "test/integration/go.mod" }}
paths:
- /go/pkg
when: always
- store_artifacts:
path: /tmp/cni-test

workflows:
version: 2
check:
Expand Down Expand Up @@ -197,3 +290,12 @@ workflows:
- kops_test:
requires:
- performance_test
- warm_ip_test:
requires:
- kops_test
- warm_eni_test:
requires:
- warm_ip_test
- bottlerocket_test:
requires:
- warm_eni_test
6 changes: 3 additions & 3 deletions scripts/lib/performance_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ function check_for_timeout() {
function save_results_to_file() {
echo $filename
echo "Date", "\"slot1\"", "\"slot2\"" >> $filename
echo $(date +"%m-%d-%Y-%T"), $((SCALE_UP_DURATION_ARRAY[0])), $((SCALE_DOWN_DURATION_ARRAY[0])) >> $filename
echo $(date +"%m-%d-%Y-%T"), $((SCALE_UP_DURATION_ARRAY[1])), $((SCALE_DOWN_DURATION_ARRAY[1])) >> $filename
echo $(date +"%m-%d-%Y-%T"), $((SCALE_UP_DURATION_ARRAY[2])), $((SCALE_DOWN_DURATION_ARRAY[2])) >> $filename
echo $(date +"%Y-%m-%d-%T"), $((SCALE_UP_DURATION_ARRAY[0])), $((SCALE_DOWN_DURATION_ARRAY[0])) >> $filename
echo $(date +"%Y-%m-%d-%T"), $((SCALE_UP_DURATION_ARRAY[1])), $((SCALE_DOWN_DURATION_ARRAY[1])) >> $filename
echo $(date +"%Y-%m-%d-%T"), $((SCALE_UP_DURATION_ARRAY[2])), $((SCALE_DOWN_DURATION_ARRAY[2])) >> $filename

cat $filename
if [[ ${#PERFORMANCE_TEST_S3_BUCKET_NAME} -gt 0 ]]; then
Expand Down
22 changes: 22 additions & 0 deletions scripts/run-release-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export RUN_BOTTLEROCKET_TEST=true
chmod +x ./scripts/run-integration-tests.sh
echo "Running bottlerocket test"
./scripts/run-integration-tests.sh
unset RUN_BOTTLEROCKET_TEST

export RUN_WARM_IP_TEST=true
echo "Running warm ip test"
./scripts/run-integration-tests.sh
unset RUN_WARM_IP_TEST

export RUN_WARM_ENI_TEST=true
echo "Running warm eni test"
./scripts/run-integration-tests.sh
unset RUN_WARM_ENI_TEST

export RUN_CONFORMANCE=false

export RUN_KOPS_TEST=true
echo "Running KOPS test"
./scripts/run-integration-tests.sh
unset RUN_KOPS_TEST
13 changes: 12 additions & 1 deletion test/integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@

# Performance
* run from cni test account to upload test results
* set PERFORMANCE_TEST_S3_BUCKET_NAME to the name of the bucket (likely s3://cni-performance-test-data)
* set PERFORMANCE_TEST_S3_BUCKET_NAME to the name of the bucket (likely s3://cni-performance-tests)
* set RUN_PERFORMANCE_TESTS=true
* to view data graph:
* Go to Isengard and open 719533996208 account (vpc-cni-ci-test) as admin
* Go to QuickSight and signup with your email email (it does not need an additional password)
* Open dashboards:
* 130-pod test graph: https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/5b0ac811-114e-40cd-b0c9-07f006c5d840
* 730-pod test graph: https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/aa1b6544-88e0-47f0-9da7-8e0b7cbd1d88
* 5000-pod test graph: https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/029169df-7a56-4249-bb69-53b57eabfa9f

* NOTE: if running on previous versions, change the date inside of the file to the date of release so as to not confuse graphing order

# KOPS
Expand All @@ -22,6 +30,9 @@
# Warm eni
* set RUN_WARM_ENI_TEST=true

# Bottlerocket
* set RUN_BOTTLEROCKET_TEST=true



## Conformance test duration log
Expand Down

0 comments on commit 24954f9

Please sign in to comment.