diff --git a/.github/workflows/weekly-cron-tests.yaml b/.github/workflows/weekly-cron-tests.yaml index d54e75710d..ad32ad8fdc 100644 --- a/.github/workflows/weekly-cron-tests.yaml +++ b/.github/workflows/weekly-cron-tests.yaml @@ -71,15 +71,3 @@ jobs: run: | ./scripts/run-integration-tests.sh if: always() - - name: Run calico tests - env: - DISABLE_PROMPT: true - ROLE_CREATE: false - ROLE_ARN: ${{ secrets.EKS_CLUSTER_ROLE_ARN }} - RUN_CNI_INTEGRATION_TESTS: false - RUN_CALICO_TEST: true - RUN_LATEST_CALICO_VERSION: true - RUN_TESTER_LB_ADDONS: true - run: | - ./scripts/run-integration-tests.sh - if: always() diff --git a/scripts/README.md b/scripts/README.md index cb569a8acb..79a30d4686 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -17,11 +17,10 @@ This README covers the prerequisites and instructions for running the scripts. #### Tests The following tests are valid to run, and setting the respective environment variable to true will run them: 1. CNI Integration Tests - `RUN_CNI_INTEGRATION_TESTS` -2. Calico Tests - `RUN_CALICO_TEST` -3. Conformance Tests - `RUN_CONFORMANCE` -4. Performance Tests - `RUN_PERFORMANCE_TESTS` -5. KOPS Tests - `RUN_KOPS_TEST` -6. Bottlerocket Tests - `RUN_BOTTLEROCKET_TEST` +2. Conformance Tests - `RUN_CONFORMANCE` +3. Performance Tests - `RUN_PERFORMANCE_TESTS` +4. KOPS Tests - `RUN_KOPS_TEST` +5. Bottlerocket Tests - `RUN_BOTTLEROCKET_TEST` Example for running performance tests: ``` diff --git a/scripts/lib/integration.sh b/scripts/lib/integration.sh index 128bde0893..f89cd4343d 100644 --- a/scripts/lib/integration.sh +++ b/scripts/lib/integration.sh @@ -24,39 +24,6 @@ function run_kops_conformance() { echo "TIMELINE: KOPS tests took $KOPS_TEST_DURATION seconds." sleep 240 #Workaround to avoid ENI leakage during cluster deletion: https://github.com/aws/amazon-vpc-cni-k8s/issues/1223 - -} - -function run_calico_test() { - echo "Starting Helm installing Tigera operator and running Calico STAR tests" - pushd ./test - VPC_ID=$(eksctl get cluster $CLUSTER_NAME -oyaml | grep vpc | cut -d ":" -f 2 | awk '{$1=$1};1') - - calico_version=$CALICO_VERSION - if [[ $1 == "true" ]]; then - # we can automatically use latest version in Calico repo, or use the known highest version (currently v3.23.0) - if [[ $RUN_LATEST_CALICO_VERSION == true ]]; then - version_tag=$(curl -i https://api.github.com/repos/projectcalico/calico/releases/latest | grep "tag_name") || true - if [[ -n $version_tag ]]; then - calico_version=$(echo $version_tag | cut -d ":" -f 2 | cut -d '"' -f 2 ) - else - echo "Getting Calico latest version failed, will fall back to default/set version $calico_version instead" - fi - else echo "Using default Calico version" - fi - echo "Using Calico version $calico_version to test" - else - version=$(kubectl describe ds -n calico-system calico-node | grep "calico/node:" | cut -d ':' -f3) - echo "Calico has been installed in testing cluster, keep using the version $version" - fi - - echo "Testing amd64" - instance_type="amd64" - ginkgo -v integration/calico -- --cluster-kubeconfig=$KUBECONFIG --cluster-name=$CLUSTER_NAME --aws-region=$AWS_DEFAULT_REGION --aws-vpc-id=$VPC_ID --calico-version=$calico_version --instance-type=$instance_type --install-calico=$1 - echo "Testing arm64" - instance_type="arm64" - ginkgo -v integration/calico -- --cluster-kubeconfig=$KUBECONFIG --cluster-name=$CLUSTER_NAME --aws-region=$AWS_DEFAULT_REGION --aws-vpc-id=$VPC_ID --calico-version=$calico_version --instance-type=$instance_type --install-calico=false - popd } function build_and_push_image(){ diff --git a/scripts/run-integration-tests.sh b/scripts/run-integration-tests.sh index a9740c6921..d2c66e39d9 100755 --- a/scripts/run-integration-tests.sh +++ b/scripts/run-integration-tests.sh @@ -31,10 +31,6 @@ ARCH=$(go env GOARCH) : "${RUN_BOTTLEROCKET_TEST:=false}" : "${RUN_PERFORMANCE_TESTS:=false}" : "${RUNNING_PERFORMANCE:=false}" -: "${RUN_CALICO_TEST:=false}" -: "${RUN_LATEST_CALICO_VERSION:=false}" -: "${CALICO_VERSION:=v3.25.0}" -: "${RUN_CALICO_TEST_WITH_PD:=true}" : "${KOPS_VERSION=v1.26.4}" __cluster_created=0 @@ -48,9 +44,6 @@ on_error() { if [[ $RUN_KOPS_TEST == true ]]; then emit_cloudwatch_metric "kops_test_status" "0" fi - if [[ $RUN_CALICO_TEST == true ]]; then - emit_cloudwatch_metric "calico_test_status" "0" - fi if [[ $RUN_BOTTLEROCKET_TEST == true ]]; then emit_cloudwatch_metric "bottlerocket_test_status" "0" fi @@ -250,26 +243,6 @@ if [[ $RUN_CNI_INTEGRATION_TESTS == true ]]; then fi fi -if [[ $RUN_CALICO_TEST == true ]]; then - # need to install Calico - run_calico_test "true" - if [[ "$RUN_CALICO_TEST_WITH_PD" == true ]]; then - # if we run prefix delegation tests as well, we need update CNI env and terminate all nodes to restore iptables rules for following tests - echo "Run Calico tests with Prefix Delegation enabled" - $KUBECTL_PATH set env daemonset aws-node -n kube-system ENABLE_PREFIX_DELEGATION=true - # we shouldn't rely on other tests to set this required ENV - $KUBECTL_PATH set env ds aws-node -n kube-system WARM_PREFIX_TARGET=1 - ids=( $(aws ec2 describe-instances --filters Name=vpc-id,Values=$VPC_ID --query 'Reservations[*].Instances[*].InstanceId' --output text) ) - aws ec2 terminate-instances --instance-ids $ids - echo "Waiting 15 minutes for new nodes being ready" - sleep 900 - # no longer need to install Calico again for PD - run_calico_test "false" - fi - - emit_cloudwatch_metric "calico_test_status" "1" -fi - if [[ $TEST_PASS -eq 0 && "$RUN_CONFORMANCE" == true ]]; then echo "Running conformance tests against cluster." START=$SECONDS diff --git a/scripts/run-release-tests.sh b/scripts/run-release-tests.sh index 7a5618009c..fd21e94159 100755 --- a/scripts/run-release-tests.sh +++ b/scripts/run-release-tests.sh @@ -20,8 +20,3 @@ export RUN_KOPS_TEST=true echo "Running KOPS test" ./scripts/run-integration-tests.sh unset RUN_KOPS_TEST - -export RUN_CALICO_TEST=true -echo "Running calico test" -./scripts/run-integration-tests.sh -unset RUN_CALICO_TEST diff --git a/test/README.md b/test/README.md index c40110b5cf..71bb9a6f20 100644 --- a/test/README.md +++ b/test/README.md @@ -26,9 +26,6 @@ Ginkgo Focus: [SMOKE] # Bottlerocket * set RUN_BOTTLEROCKET_TEST=true -# Calico - * set RUN_CALICO_TEST=true - ## How to Manually delete k8s tester Resources (order of deletion) Cloudformation - (all except cluster, vpc) EC2 - load balancers, key pair