Skip to content

Commit

Permalink
Add a launch.json 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 committed Apr 15, 2024
1 parent 23bec42 commit c19eb95
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Session.vim
tags
### VisualStudioCode ###
.vscode/*
!.vscode/launch.json
.history
# End of https://www.gitignore.io/api/go,vim,emacs,visualstudiocode
cmd/manager/__debug_bin
Expand Down
45 changes: 45 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"version": "0.2.0",
"configurations": [
// Run `make kind-bootstrap-cluster-dev` before launching this.
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/main.go",
"args": ["controller", "--leader-elect=false", "--log-level=3", "--v=5", "--enable-operator-policy=true"],
"env": {
"WATCH_NAMESPACE": "managed",
"KUBECONFIG": "${workspaceFolder}/kubeconfig_managed_e2e",
}
},
// 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",
]
},
// Set the correct path to the governance-policy-framework repo directory in the env section.
{
"name": "Launch Package (Framework E2E) (instructions in launch.json)",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/main.go",
"args": ["controller", "--leader-elect=false", "--log-level=3", "--v=5", "--enable-operator-policy=true"],
"env": {
"WATCH_NAMESPACE": "managed",
"HUB_CONFIG": "${userHome}/git/governance-policy-framework/kubeconfig_hub",
"MANAGED_CONFIG": "${userHome}/git/governance-policy-framework/kubeconfig_managed",
"KUBECONFIG": "${userHome}/git/governance-policy-framework/kubeconfig_managed",
}
}
]
}

0 comments on commit c19eb95

Please sign in to comment.