mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-18 20:17:04 +00:00
* Feat: Add integration test setup and cleanup scripts, enhance server testing capabilities Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * Refactor: Rename variables for clarity and consistency in core command handling Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * refactor: Remove redundant server test targets and enhance logging in core command execution Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * Refactor server tests and enhance E2E testing setup - Updated server_test.go to improve test organization and clarity, including the addition of BeforeSuite and AfterSuite for environment setup and teardown. - Enhanced the waitWebhookSecretVolume tests to cover various scenarios including empty directories and files. - Added new tests for syncConfigurations and logging setup functions to ensure proper configuration handling. - Introduced a new E2E test for the main function in main_e2e_test.go to validate the core functionality of the application. - Improved the e2e.mk file to set up a k3d cluster for running main_e2e_test with embedded test binaries and added cleanup steps. - Removed the setup-integration-tests.sh script as its functionality is now integrated into the Makefile. Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * Refactor: improve multicluster test timeouts Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> --------- Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
80 lines
2.7 KiB
YAML
80 lines
2.7 KiB
YAML
name: 'Kubevela K8s Upgrade Multicluster E2E Test'
|
|
description: 'Runs Kubevela Kubernetes upgrade multicluster end-to-end tests, uploads coverage, and collects diagnostics on failure.'
|
|
author: 'viskumar_gwre'
|
|
|
|
inputs:
|
|
codecov-token:
|
|
description: 'Codecov token for uploading coverage reports'
|
|
required: false
|
|
default: ''
|
|
codecov-enable:
|
|
description: 'Enable codecov coverage upload'
|
|
required: false
|
|
default: 'false'
|
|
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
# ========================================================================
|
|
# Environment Setup
|
|
# ========================================================================
|
|
- name: Configure environment setup
|
|
uses: ./.github/actions/env-setup
|
|
with:
|
|
install-ginkgo: 'true'
|
|
install-setup-envtest: 'false'
|
|
install-kustomize: 'false'
|
|
|
|
# ========================================================================
|
|
# E2E Test Execution
|
|
# ========================================================================
|
|
- name: Prepare e2e test environment
|
|
shell: bash
|
|
run: |
|
|
# Build CLI tools and prepare test environment
|
|
echo "Building KubeVela CLI..."
|
|
make vela-cli
|
|
|
|
echo "Cleaning up previous test artifacts..."
|
|
make e2e-cleanup
|
|
|
|
echo "Setting up core authentication for e2e tests..."
|
|
make e2e-setup-core-auth
|
|
|
|
- name: Execute multicluster upgrade e2e tests
|
|
shell: bash
|
|
run: |
|
|
# Add built CLI to PATH and run multicluster tests
|
|
export PATH=$(pwd)/bin:$PATH
|
|
|
|
echo "Running e2e multicluster upgrade tests..."
|
|
make e2e-multicluster-test
|
|
|
|
- name: Upload coverage report
|
|
if: ${{ inputs.codecov-enable == 'true' }}
|
|
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24
|
|
with:
|
|
token: ${{ inputs.codecov-token }}
|
|
files: /tmp/e2e-profile.out,/tmp/e2e_multicluster_test.out
|
|
flags: e2e-multicluster-test
|
|
name: codecov-umbrella
|
|
|
|
# ========================================================================
|
|
# Failure Diagnostics
|
|
# ========================================================================
|
|
- name: Collect failure diagnostics
|
|
if: failure()
|
|
shell: bash
|
|
run: |
|
|
echo "=== FAILURE DIAGNOSTICS ==="
|
|
echo "Collecting diagnostic information for debugging..."
|
|
|
|
echo "--- Cluster Status ---"
|
|
kubectl get nodes -o wide || true
|
|
kubectl get pods -A || true
|
|
|
|
echo "--- KubeVela System Logs ---"
|
|
kubectl logs -n vela-system -l app.kubernetes.io/name=vela-core --tail=100 || true
|
|
|
|
echo "--- Recent Events ---"
|
|
kubectl get events -A --sort-by='.lastTimestamp' --field-selector type!=Normal || true |