Skip to content

Commit

Permalink
Add a launch.json file for local development
Browse files Browse the repository at this point in the history
Relates:
https://issues.redhat.com/browse/ACM-10885

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
  • Loading branch information
mprahl authored and openshift-merge-bot[bot] committed Apr 22, 2024
1 parent cdccd55 commit d37b8b1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ bin/
vendor/
build/_output/
.vscode/
!.vscode/launch.json

kubeconfig_*
coverage*.out
Expand Down
31 changes: 31 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -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"
],
},
]
}

0 comments on commit d37b8b1

Please sign in to comment.