diff --git a/.gitignore b/.gitignore index cf9fc82b..b1baee7c 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ bin/ vendor/ build/_output/ .vscode/ +!.vscode/launch.json kubeconfig_* coverage*.out diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..7a046f65 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,31 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Launch Package", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "${workspaceFolder}/main.go", + "args": ["--kubeconfig=${workspaceFolder}/kubeconfig_cluster1", "controller", "--namespace=open-cluster-management"], + "env": { + "CONFIG_POLICY_CONTROLLER_IMAGE": "quay.io/open-cluster-management/config-policy-controller:latest", + "KUBE_RBAC_PROXY_IMAGE": "registry.redhat.io/openshift4/ose-kube-rbac-proxy:v4.10", + "GOVERNANCE_POLICY_FRAMEWORK_ADDON_IMAGE": "quay.io/open-cluster-management/governance-policy-framework-addon:latest", + "KUBECONFIG": "${workspaceFolder}/kubeconfig_cluster1", + } + }, + // Set FDescribe or FIt on the test to debug. Then set the desired breakpoint. + { + "name": "Launch Test Function (instructions in launch.json)", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "${workspaceFolder}/test/e2e/e2e_suite_test.go", + "args": [ + "-ginkgo.debug", + "-ginkgo.v" + ], + }, + ] +} \ No newline at end of file