opendatahub-io / data-science-pipelines-operator

Apache License 2.0
13 stars 55 forks source link

Add support for using route or service as target endpoints in the test suite #711

Closed diegolovison closed 2 months ago

diegolovison commented 2 months ago

The issue resolved by this Pull Request:

Resolves partially RHOAIENG-10212

Description of your changes:

This PR introduces enhancements to the test suite by allowing the use of either a route or a Kubernetes service as the target endpoint for interacting with the Data Science Pipelines Operator (DSPO).

  1. New --endpointType Flag:

    • A new --endpointType flag is introduced in the test suite configuration, which specifies whether the test should use a Kubernetes service (service) or an OpenShift route (route) as the target endpoint for DSPO.
  2. Infrastructure Cleanup Option:

    • The --cleanup flag is renamed to --clean-infra. This option allows automated cleanup of infrastructure before rerunning tests.
  3. Modifications in Test Scripts:

    • Updated the shell scripts and Go test files to accommodate the new endpoint selection mechanism.
    • The HTTP client in the tests is now initialized with custom transport to support token-based authentication when necessary.
    • Various test functions now rely on the Clientmgr.httpClient to perform HTTP requests, decoupling from the standard Go http package.
  4. New Test Resources:

    • Two new DSPA (Data Science Pipelines Application) YAML resources (dspa.yaml and dspa-external.yaml) are added for testing RHOAI.
  5. Test Case Improvements:

    • Improved the pod listing logic by retrieving only running pods, ensuring the test suite can be rerun multiple times without issues.

Testing instructions

No manual testing required.

Checklist

HumairAK commented 2 months ago

@diegolovison will provide a follow up pr to address the changes

/lgtm /approve

openshift-ci[bot] commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: HumairAK

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/opendatahub-io/data-science-pipelines-operator/blob/main/OWNERS)~~ [HumairAK] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
openshift-ci[bot] commented 2 months ago

@diegolovison: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/integration-test-odh-dspo 0dcdc33052da73e58bf3cb4ddfd339928ad2dd25 link unknown /test integration-test-odh-dspo

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).