|
| 1 | +{ |
| 2 | + "version": "0.2.0", |
| 3 | + "configurations": [ |
| 4 | + // Run `make kind-bootstrap-cluster-dev` before launching this. |
| 5 | + { |
| 6 | + "name": "Launch Package", |
| 7 | + "type": "go", |
| 8 | + "request": "launch", |
| 9 | + "mode": "auto", |
| 10 | + "program": "${workspaceFolder}/main.go", |
| 11 | + "args": ["controller", "--leader-elect=false", "--log-level=3", "--v=5", "--enable-operator-policy=true"], |
| 12 | + "env": { |
| 13 | + "WATCH_NAMESPACE": "managed", |
| 14 | + "KUBECONFIG": "${workspaceFolder}/kubeconfig_managed", |
| 15 | + } |
| 16 | + }, |
| 17 | + // Set FDescribe or FIt on the test to debug. Then set the desired breakpoint. |
| 18 | + { |
| 19 | + "name": "Launch Test Function (instructions in launch.json)", |
| 20 | + "type": "go", |
| 21 | + "request": "launch", |
| 22 | + "mode": "auto", |
| 23 | + "program": "${workspaceFolder}/test/e2e/e2e_suite_test.go", |
| 24 | + "args": [ |
| 25 | + "-ginkgo.debug", |
| 26 | + "-ginkgo.v", |
| 27 | + ], |
| 28 | + "env": { |
| 29 | + "KUBECONFIG": "${workspaceFolder}/kubeconfig_managed_e2e", |
| 30 | + } |
| 31 | + }, |
| 32 | + // Set the correct path to the governance-policy-framework repo directory in the env section. |
| 33 | + { |
| 34 | + "name": "Launch Package (Framework E2E) (instructions in launch.json)", |
| 35 | + "type": "go", |
| 36 | + "request": "launch", |
| 37 | + "mode": "auto", |
| 38 | + "program": "${workspaceFolder}/main.go", |
| 39 | + "args": ["controller", "--leader-elect=false", "--log-level=3", "--v=5", "--enable-operator-policy=true"], |
| 40 | + "env": { |
| 41 | + "WATCH_NAMESPACE": "managed", |
| 42 | + "HUB_CONFIG": "${userHome}/git/governance-policy-framework/kubeconfig_hub", |
| 43 | + "MANAGED_CONFIG": "${userHome}/git/governance-policy-framework/kubeconfig_managed", |
| 44 | + "KUBECONFIG": "${userHome}/git/governance-policy-framework/kubeconfig_managed", |
| 45 | + } |
| 46 | + } |
| 47 | + ] |
| 48 | +} |
0 commit comments