Skip to content

Commit

Permalink
Add flaky e2e test stage
Browse files Browse the repository at this point in the history
Signed-off-by: perdasilva <perdasilva@redhat.com>
  • Loading branch information
perdasilva authored and njhale committed Feb 14, 2022
1 parent 817ef43 commit 2d49fb5
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/flaky-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: flaky-e2e-tests
on:
schedule:
- cron: '30 5,17 * * *' # run this every day at 5:30 and 17:30 UTC (00:30 and 12:30 ET)
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
flaky-e2e-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v2
with:
go-version: '~1.17'
- run: make e2e-local E2E_NODES=1 TEST='\[FLAKY\]' ARTIFACTS_DIR=./artifacts/
- name: Archive Test Artifacts # test results, failed or not, are always uploaded.
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: e2e-test-output-${{(github.event.pull_request.head.sha||github.sha)}}-${{ github.run_id }}
path: ${{ github.workspace }}/bin/artifacts/*
4 changes: 2 additions & 2 deletions test/e2e/csv_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4255,7 +4255,7 @@ var _ = Describe("Disabling copied CSVs", func() {
})

When("an operator is installed in AllNamespace mode", func() {
It("should have Copied CSVs in all other namespaces", func() {
It("[FLAKY] should have Copied CSVs in all other namespaces", func() {
Eventually(func() error {
requirement, err := k8slabels.NewRequirement(operatorsv1alpha1.CopiedLabelKey, selection.Equals, []string{csv.GetNamespace()})
if err != nil {
Expand Down Expand Up @@ -4335,7 +4335,7 @@ var _ = Describe("Disabling copied CSVs", func() {
}).Should(Succeed())
})

It("should be reflected in the olmConfig.Status.Condition array that the expected number of copied CSVs exist", func() {
It("[FLAKY] should be reflected in the olmConfig.Status.Condition array that the expected number of copied CSVs exist", func() {
Eventually(func() error {
var olmConfig operatorsv1.OLMConfig
if err := ctx.Ctx().Client().Get(context.TODO(), apitypes.NamespacedName{Name: "cluster"}, &olmConfig); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/installplan_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3190,15 +3190,15 @@ var _ = Describe("Install Plan", func() {
Expect(err).NotTo(HaveOccurred())
})

It("should clear clear up the condition in the InstallPlan status that contains an error message when a valid OperatorGroup is created", func() {
It("[FLAKY] should clear clear up the condition in the InstallPlan status that contains an error message when a valid OperatorGroup is created", func() {

// first wait for a condition with a message exists
cond := operatorsv1alpha1.InstallPlanCondition{Type: operatorsv1alpha1.InstallPlanInstalled, Status: corev1.ConditionFalse, Reason: operatorsv1alpha1.InstallPlanReasonInstallCheckFailed,
Message: "no operator group found that is managing this namespace"}

Eventually(func() bool {
fetchedInstallPlan, err := fetchInstallPlanWithNamespace(GinkgoT(), crc, installPlanName, ns.GetName(), buildInstallPlanPhaseCheckFunc(operatorsv1alpha1.InstallPlanPhaseInstalling))
if err != nil || fetchedInstallPlan == nil{
if err != nil || fetchedInstallPlan == nil {
return false
}
if fetchedInstallPlan.Status.Phase != operatorsv1alpha1.InstallPlanPhaseInstalling {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/operator_groups_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2266,7 +2266,7 @@ var _ = Describe("Operator Group", func() {

})

When("an OperatorGroup is created having matching label selector defined", func() {
When("[FLAKY] an OperatorGroup is created having matching label selector defined", func() {
var operatorGroup *v1.OperatorGroup

BeforeEach(func() {
Expand Down

0 comments on commit 2d49fb5

Please sign in to comment.