Skip to content
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

tests: e2e test for trusted-ca-bundle #1346

Open
wants to merge 2 commits into
base: incubation
Choose a base branch
from

Conversation

Sara4994
Copy link
Contributor

@Sara4994 Sara4994 commented Nov 5, 2024

Description

This PR is intended to include e2e tests for the trusted CA bundle feature.

JIRA issue: https://issues.redhat.com/browse/RHOAIENG-3924

How Has This Been Tested?

Screenshot or short clip

Merge criteria

  • You have read the contributors guide.
  • Commit messages are meaningful - have a clear and concise summary and detailed explanation of what was changed and why.
  • Pull Request contains a description of the solution, a link to the JIRA issue, and to any dependent or related Pull Request.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Copy link

openshift-ci bot commented Nov 5, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from sara4994. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Sara4994
Copy link
Contributor Author

Sara4994 commented Nov 5, 2024

/cc @VaishnaviHire

@@ -129,45 +129,45 @@ func setupDSCInstance(name string) *dscv1.DataScienceCluster {
},
ModelMeshServing: modelmeshserving.ModelMeshServing{
Component: components.Component{
ManagementState: operatorv1.Managed,
ManagementState: operatorv1.Removed,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ManagementState changes need to be reverted

Copy link
Contributor Author

@Sara4994 Sara4994 Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops.. yea my bad. just reverted them

@Sara4994 Sara4994 force-pushed the trustedcabundle-e2e-tests branch 2 times, most recently from a439e36 to 37d0b92 Compare November 5, 2024 20:02
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (incubation@bde4b4e). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff              @@
##             incubation    #1346   +/-   ##
=============================================
  Coverage              ?   19.08%           
=============================================
  Files                 ?       30           
  Lines                 ?     3369           
  Branches              ?        0           
=============================================
  Hits                  ?      643           
  Misses                ?     2657           
  Partials              ?       69           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zdtsw zdtsw added the odh-2.21 label Nov 6, 2024
@VaishnaviHire
Copy link
Member

@Sara4994 As part of #1339 @zdtsw introduced changes, that can be validated as part of this PR. The test cases are included in PR description.

@zdtsw
Copy link
Member

zdtsw commented Nov 7, 2024

@Sara4994 As part of #1339 @zdtsw introduced changes, that can be validated as part of this PR. The test cases are included in PR description.

i dont think it need to be too complicated in test case to cover all 3 senaiors from that "fix" PR.
the real one we need is to check if the foundConfigMap.Data[CADataFieldName] has an ending newline, then it is fine.

@@ -444,6 +451,48 @@ func (tc *testContext) testDefaultCertsAvailable() error {
return nil
}

func (tc *testContext) testTrustedCABundle() error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure i understand the logic here:
if we are making e2e test (not unit-test) , what we should test is:

  1. set managementStateChangeTrustedCA := true
  • check if Configmap is created in tc.testDSCI.Spec.ApplicationsNamespace
  • check content of CADataFieldName == tc.testDSCI.Spec.TrustedCABundle.CustomCABundle
  • check content of CADataFieldName has newline as ending (this is new from current code base)
  1. set managementStateChangeTrustedCA := false
  • check no Configmap in tc.testDSCI.Spec.ApplicationsNamespace

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, seems confusion for the above comments:
set managementStateChangeTrustedCA := true
is not meant to be set in the testcase, this is only to illustrate the case when set to Managed VS Removed
what need to be done is tc.testDSCI.Spec.TrustedCABundle.ManagementState: Managed

@Sara4994
Copy link
Contributor Author

/test opendatahub-operator-e2e

Copy link

openshift-ci bot commented Nov 15, 2024

@Sara4994: 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/opendatahub-operator-e2e 96ec2c2 link true /test opendatahub-operator-e2e

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants