Bug 1829580

Summary: Add e2e test for stale condition DefaultSecurityContextConstraints_Mutated
Product: OpenShift Container Platform Reporter: Abu Kashem <akashem>
Component: Test InfrastructureAssignee: Abu Kashem <akashem>
Status: CLOSED ERRATA QA Contact: Ke Wang <kewang>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.4CC: aos-bugs, mfojtik, xxia
Target Milestone: ---   
Target Release: 4.4.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1829576
: 1829585 (view as bug list) Environment:
Last Closed: 2020-06-29 15:33:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1829585    
Bug Blocks: 1829576    

Description Abu Kashem 2020-04-29 20:05:28 UTC
+++ This bug was initially created as a clone of Bug #1829576 +++

Add an e2e test to validates that stale condition DefaultSecurityContextConstraintsUpgradeable is removed from the status block.

To make the release cut off, we validated manually and had to merge the corresponding PR without an e2e test.
PR: https://github.com/openshift/cluster-kube-apiserver-operator/pull/839
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1827336

Comment 1 Abu Kashem 2020-05-20 17:13:23 UTC
Waiting for https://github.com/openshift/cluster-kube-apiserver-operator/pull/845 to be approved by the cherry-pick manager.

Comment 3 Abu Kashem 2020-05-21 16:52:18 UTC
I accidentally set the target release to "4.4.0", setting it to "4.4.z".

Comment 4 Abu Kashem 2020-06-18 14:12:37 UTC
Waiting for it to be cherry-picked.

Comment 7 Ke Wang 2020-06-22 07:57:25 UTC
$  oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.4.0-0.nightly-2020-06-21-210301   True        False         6h8m    Cluster version is 4.4.0-0.nightly-2020-06-21-210301

Related test code can cover the fix:
$ git clone https://github.com/openshift/cluster-kube-apiserver-operator.git# or git pull if already cloned
$ cd cluster-kube-apiserver-operator/
$ git branch -a
$ git checkout remotes/origin/release-4.4
$ cd test/e2e
$ $ ls clean_stale_condition_test.go
clean_stale_condition_test.go

$ go test -v -run TestRemoveStaleSCCUpgradeableCondition
=== RUN   TestRemoveStaleSCCUpgradeableCondition
Found configuration for host https://api.ke22gcp41.qe.gcp.cluster.com:6443.
--- PASS: TestRemoveStaleSCCUpgradeableCondition (7.44s)
PASS
ok  	github.com/openshift/cluster-kube-apiserver-operator/test/e2e	7.461s

The test run passed as expected, move the bug verified.

Comment 9 errata-xmlrpc 2020-06-29 15:33:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2713