Skip to content

OWLS-102288 fix test code #3391

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 2 commits into from
Sep 8, 2022
Merged

Conversation

doxiao
Copy link
Member

@doxiao doxiao commented Sep 8, 2022

Modify integration test case to cover what is intended to test.

The test case does the following:

  • patch cluster resource above max of replicas, which failed as expected.
  • patch domain with new introspect number
  • check domain event to be generated for replicas too high.

Because step #1 failed, the change to the cluster's replicas does not even get to the operator, and therefore, the operator does not know about it, not to mention generating a Failed condition (and events).

In order for an invalid replicas to be accepted and reach to the operator, the cluster resource itself should not have a replicas set, and the domain resource's replicas and introspectVersion need to be changed in a single patch operation.

There are two approaches to make sure that the cluster resource does not have replicas:

  1. add a new cluster resource that does not have the replicas set. You need also make sure that the cluster is configured on the WebLogic domain side.
  2. remove the replicas setting from the existing cluster resources.

This PR contains the integration test code change with approach #2. The failing test case passed with this branch. https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/12742/

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 8, 2022
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 8, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@doxiao doxiao marked this pull request as ready for review September 8, 2022 20:14
@oracle oracle deleted a comment from doxiao Sep 8, 2022
@rjeberhard rjeberhard merged commit b2322b5 into cluster-reference Sep 8, 2022
@rjeberhard rjeberhard deleted the owls102288-fix-test branch September 8, 2022 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants