From 014a8c12716926e7618e3e5e093b28cd39f3f01a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Schw=C3=A4gerl?= Date: Tue, 7 Jan 2025 09:59:36 +0100 Subject: [PATCH] chore: Add VSCode launch config for tests (#2160) --- .vscode/launch.json | 71 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index c0e978007b..b5c93ff405 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -17,6 +17,75 @@ "ENABLE_WEBHOOKS": "false" }, "preLaunchTask": "Install CRDs" - } + }, + { + "name": "Launch KLM Integration Tests - Package of current file", + "type": "go", + "request": "launch", + "mode": "test", + "program": "${fileDirname}", + "args": ["-test.v", "-ginkgo.flake-attempts=10"], + "env": { + // make sure you added the following to your VSCODE settings.json + "KUBEBUILDER_ASSETS": "${config:go.testEnvVars.KUBEBUILDER_ASSETS}" + }, + }, + { + "name": "Launch KLM E2E Test", + "type": "go", + "request": "launch", + "mode": "test", + "program": "${workspaceFolder}/tests/e2e", + "args": ["-test.timeout", "20m", "-ginkgo.v", "-ginkgo.focus", "${input:e2eTestTargetName}"], + "env": { + "KCP_KUBECONFIG": "${env:HOME}/.k3d/kcp-local.yaml", + "SKR_KUBECONFIG": "${env:HOME}/.k3d/skr-local.yaml", + } + }, + ], + "inputs": [ + { + // not all of the options work OOTB, see deploy-lifecycle-manager-e2e action.yaml for specific patches + "id": "e2eTestTargetName", + "type": "pickString", + "description": "E2E test target name", + "options": [ + "KCP Kyma CR Deprovision With Foreground Propagation After SKR Cluster Removal", + "KCP Kyma CR Deprovision With Background Propagation After SKR Cluster Removal", + "Manage Module Metrics", + "Mandatory Module Metrics", + "Mandatory Module With Old Naming Pattern Metrics", + "Enqueue Event from Watcher", + "Module Status Decoupling With StatefulSet", + "Module Status Decoupling With Deployment", + "Module Without Default CR", + "Module Keep Consistent After Deploy", + "Mandatory Module Installation and Deletion", + "Mandatory Module With Old Naming Pattern Installation and Deletion", + "Non Blocking Kyma Module Deletion", + "Manifest Skip Reconciliation Label", + "Kyma Module Upgrade Under Deletion", + "Kyma Module with ModuleReleaseMeta Upgrade Under Deletion", + "Unmanaging Kyma Module", + "Purge Controller", + "Purge Metrics", + "Module Upgrade By Channel Switch", + "Module Upgrade By New Version", + "Module with ModuleReleaseMeta Upgrade By New Version", + "Module Install By Version", + "CA Certificate Rotation", + "Istio Gateway Secret Rotation", + "Self Signed Certificate Rotation", + "Misconfigured Kyma Secret", + "RBAC Privileges", + "OCM Format Module Template", + "ModuleReleaseMeta With Obsolete ModuleTemplate", + "ModuleReleaseMeta Watch Trigger", + "ModuleReleaseMeta Sync", + "KCP Kyma Module status on SKR connection lost", + "ModuleReleaseMeta Not Allowed Installation", + "Labelling SKR resources" + ] + }, ] }