-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hosted mode tests for OperatorPolicy
The "hosting cluster" should be used for the Policy, OperatorPolicy, and compliance events Ref: https://issues.redhat.com/browse/ACM-11255 Signed-off-by: yiraeChristineKim <yikim@redhat.com>
- Loading branch information
1 parent
d734b7a
commit 7c1a049
Showing
8 changed files
with
278 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,89 @@ | ||
{ | ||
"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", | ||
} | ||
}, | ||
// 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", | ||
], | ||
"env": { | ||
"KUBECONFIG": "${workspaceFolder}/kubeconfig_managed_e2e", | ||
} | ||
}, | ||
// 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", | ||
} | ||
"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" | ||
} | ||
}, | ||
{ | ||
"name": "Launch hosted 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", | ||
"--target-kubeconfig-path=${workspaceFolder}/kubeconfig_managed2" | ||
], | ||
"env": { | ||
"WATCH_NAMESPACE": "managed", | ||
"KUBECONFIG": "${workspaceFolder}/kubeconfig_managed" | ||
} | ||
] | ||
}, | ||
// 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"], | ||
"env": { | ||
"KUBECONFIG": "${workspaceFolder}/kubeconfig_managed_e2e" | ||
} | ||
}, | ||
// Set FDescribe or FIt on the test to debug. Then set the desired breakpoint. | ||
{ | ||
"name": "Launch Hosted 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", "--is_hosted=true"], | ||
"env": { | ||
"KUBECONFIG": "${workspaceFolder}/kubeconfig_managed_e2e", | ||
"TARGET_KUBECONFIG_PATH": "${workspaceFolder}/kubeconfig_managed2_e2e", | ||
} | ||
}, | ||
// 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" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.