Skip to content

Commit 2d49fb5

Browse files
perdasilvanjhale
authored andcommitted
Add flaky e2e test stage
Signed-off-by: perdasilva <[email protected]>
1 parent 817ef43 commit 2d49fb5

File tree

4 files changed

+29
-5
lines changed

4 files changed

+29
-5
lines changed

.github/workflows/flaky-e2e.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: flaky-e2e-tests
2+
on:
3+
schedule:
4+
- cron: '30 5,17 * * *' # run this every day at 5:30 and 17:30 UTC (00:30 and 12:30 ET)
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
workflow_dispatch:
10+
jobs:
11+
flaky-e2e-tests:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: actions/setup-go@v2
16+
with:
17+
go-version: '~1.17'
18+
- run: make e2e-local E2E_NODES=1 TEST='\[FLAKY\]' ARTIFACTS_DIR=./artifacts/
19+
- name: Archive Test Artifacts # test results, failed or not, are always uploaded.
20+
if: ${{ always() }}
21+
uses: actions/upload-artifact@v2
22+
with:
23+
name: e2e-test-output-${{(github.event.pull_request.head.sha||github.sha)}}-${{ github.run_id }}
24+
path: ${{ github.workspace }}/bin/artifacts/*

test/e2e/csv_e2e_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4255,7 +4255,7 @@ var _ = Describe("Disabling copied CSVs", func() {
42554255
})
42564256

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

4338-
It("should be reflected in the olmConfig.Status.Condition array that the expected number of copied CSVs exist", func() {
4338+
It("[FLAKY] should be reflected in the olmConfig.Status.Condition array that the expected number of copied CSVs exist", func() {
43394339
Eventually(func() error {
43404340
var olmConfig operatorsv1.OLMConfig
43414341
if err := ctx.Ctx().Client().Get(context.TODO(), apitypes.NamespacedName{Name: "cluster"}, &olmConfig); err != nil {

test/e2e/installplan_e2e_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3190,15 +3190,15 @@ var _ = Describe("Install Plan", func() {
31903190
Expect(err).NotTo(HaveOccurred())
31913191
})
31923192

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

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

31993199
Eventually(func() bool {
32003200
fetchedInstallPlan, err := fetchInstallPlanWithNamespace(GinkgoT(), crc, installPlanName, ns.GetName(), buildInstallPlanPhaseCheckFunc(operatorsv1alpha1.InstallPlanPhaseInstalling))
3201-
if err != nil || fetchedInstallPlan == nil{
3201+
if err != nil || fetchedInstallPlan == nil {
32023202
return false
32033203
}
32043204
if fetchedInstallPlan.Status.Phase != operatorsv1alpha1.InstallPlanPhaseInstalling {

test/e2e/operator_groups_e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2266,7 +2266,7 @@ var _ = Describe("Operator Group", func() {
22662266

22672267
})
22682268

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

22722272
BeforeEach(func() {

0 commit comments

Comments
 (0)