Bug 1829576

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.3.zCC: aos-bugs, mfojtik, xxia
Target Milestone: ---   
Target Release: 4.3.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1829580 (view as bug list) Environment:
Last Closed: 2020-07-07 14:48:25 UTC Type: Bug
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: 1829580    
Bug Blocks:    

Description Abu Kashem 2020-04-29 19:59:32 UTC
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/838
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1827337

Comment 1 Abu Kashem 2020-05-20 17:15:57 UTC
https://github.com/openshift/cluster-kube-apiserver-operator/pull/840

it's waiting on the 4.4 PR - https://github.com/openshift/cluster-kube-apiserver-operator/pull/845 (it's waiting on cherry pick approval)

Comment 3 Abu Kashem 2020-05-21 19:28:10 UTC
The corresponding fix has already been pushed in a separate PR. setting severity to low.

Comment 4 Abu Kashem 2020-06-18 14:14:03 UTC
PR is out, ready to go. Need a cherry-pick approval. Also waiting for the 4.4 PR https://bugzilla.redhat.com/show_bug.cgi?id=1829580 to be cherry-picked first.

Comment 8 Ke Wang 2020-06-29 04:05:40 UTC
$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.3.0-0.nightly-2020-06-27-134851   True        False         72m     Cluster version is 4.3.0-0.nightly-2020-06-27-134851

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.3
$ cd test/e2e
$ ls clean_stale_condition_test.go
clean_stale_condition_test.go

Before run tests, set env variable KUBECONFIG of one 4.3 cluster,
$export KUBECONFIG=<kubeconfig file>

$ cd cluster-kube-apiserver-operator/test/e2e
$ go test -v -run TestRemoveStaleSCCUpgradeableCondition
go: downloading github.com/openshift/library-go v0.0.0-20200114152504-c6063f06a9cd
go: downloading github.com/openshift/client-go v0.0.0-20191022152013-2823239d2298
go: downloading k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655
go: downloading k8s.io/client-go v0.0.0-20190918160344-1fbdaa4c8d90
go: downloading google.golang.org/grpc v1.23.0
...
=== RUN   TestRemoveStaleSCCUpgradeableCondition
Found configuration for host https://api.ke29aws31...openshift.com:6443.
--- PASS: TestRemoveStaleSCCUpgradeableCondition (2.57s)
PASS
ok  	github.com/openshift/cluster-kube-apiserver-operator/test/e2e	2.869s

Related tests run passed, move the bug verified.

Comment 10 errata-xmlrpc 2020-07-07 14:48:25 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:2805