-
Notifications
You must be signed in to change notification settings - Fork 66
MG-128: Add/Update e2e tests #311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
bccb95d
MG-128: Add/Update e2e tests
praveencodes 787bdd4
add the adminClient and nonAdminClient test cases
praveencodes 743687d
Fix the inconsistencies
praveencodes a106085
fix dependency issue
praveencodes 3a7c0b4
fix the dependency issue
praveencodes 59e14db
fix the Junit report generation issue and clean up
praveencodes 6ef1b31
addressed the comments and fixed it.
praveencodes d552982
remove unnecessary checks, create resources from manifests, etc
praveencodes 94de487
address coderabbit comments
praveencodes 8791f83
address the review comments
praveencodes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -87,3 +87,4 @@ mustgather-example.yaml | |
| saas-must-gather-operator-bundle | ||
| # IDE | ||
| .idea | ||
| test/e2e/test-run-results/ | ||
This file contains hidden or 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 hidden or 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 hidden or 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,2 +1 @@ | ||
| openshift/golang-osd-operator | ||
| openshift/golang-osd-e2e | ||
This file contains hidden or 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 hidden or 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 hidden or 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
swghosh marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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 hidden or 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,11 +1,14 @@ | ||
| apiVersion: managed.openshift.io/v1alpha1 | ||
| apiVersion: operator.openshift.io/v1alpha1 | ||
| kind: MustGather | ||
| metadata: | ||
| name: example-mustgather-retain-resources | ||
| spec: | ||
| caseID: '02527285' | ||
| caseManagementAccountSecretRef: | ||
| name: case-management-creds | ||
| serviceAccountRef: | ||
| name: must-gather-admin | ||
| uploadTarget: | ||
| type: SFTP | ||
| sftp: | ||
| caseID: '02527285' | ||
| caseManagementAccountSecretRef: | ||
| name: case-management-creds | ||
| retainResourcesOnCompletion: true |
This file contains hidden or 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 hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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,14 +1,22 @@ | ||
| ## Locally running e2e test suite | ||
| When updating your operator it's beneficial to add e2e tests for new functionality AND ensure existing functionality is not breaking using e2e tests. | ||
| To do this, following steps are recommended | ||
| To do this, following steps are recommended: | ||
|
|
||
| 1. Run "make e2e-binary-build" to make sure e2e tests build | ||
| 2. Deploy your new version of operator in a test cluster | ||
| 3. Run "go install github.com/onsi/ginkgo/ginkgo@latest" | ||
| 4. Get kubeadmin credentials from your cluster using | ||
| 1. Deploy your new version of operator in a test cluster | ||
| 2. Get kubeadmin credentials from your cluster using: | ||
|
|
||
| ocm get /api/clusters_mgmt/v1/clusters/(cluster-id)/credentials | jq -r .kubeconfig > /(path-to)/kubeconfig | ||
| ```bash | ||
| ocm get /api/clusters_mgmt/v1/clusters/(cluster-id)/credentials | jq -r .kubeconfig > /path/to/kubeconfig | ||
| ``` | ||
|
|
||
| 5. Run test suite using | ||
|
|
||
| DISABLE_JUNIT_REPORT=true KUBECONFIG=/(path-to)/kubeconfig ./(path-to)/bin/ginkgo --tags=osde2e -v test/e2e | ||
| 3. Run test suite using: | ||
|
|
||
| ```bash | ||
| KUBECONFIG=/path/to/kubeconfig make test-e2e | ||
| ``` | ||
|
|
||
| Or to disable JUnit reports: | ||
|
|
||
| ```bash | ||
| DISABLE_JUNIT_REPORT=true KUBECONFIG=/path/to/kubeconfig make test-e2e | ||
| ``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.