Skip to content

Commit 9f4f719

Browse files
committed
Add flaky e2e test stage
Signed-off-by: perdasilva <[email protected]>
1 parent 0a553a2 commit 9f4f719

File tree

6 files changed

+35
-9
lines changed

6 files changed

+35
-9
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/catalog_e2e_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// +build !bare
1+
//go:build !bare
2+
// +build !bare
23

34
package e2e
45

@@ -870,7 +871,7 @@ var _ = Describe("Catalog represents a store of bundles which OLM can use to ins
870871
Expect(v).Should(Equal(version.OperatorVersion{Version: busyboxVersion}), "latest version of operator not installed: catalog source update failed")
871872
})
872873

873-
It("Dependency has correct replaces field", func() {
874+
It("[FLAKY] Dependency has correct replaces field", func() {
874875
// Create a CatalogSource that contains the busybox v1 and busybox-dependency v1 images
875876
// Create a Subscription for busybox v1, which has a dependency on busybox-dependency v1.
876877
// Wait for the busybox and busybox2 Subscriptions to succeed

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/gc_e2e_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,8 @@ var _ = Describe("Garbage collection for dependent resources", func() {
646646
}).Should(BeNil())
647647
})
648648

649-
It("should have removed the old configmap and put the new configmap in place", func() {
649+
// issue: https://github.com/operator-framework/operator-lifecycle-manager/issues/2626
650+
It("[FLAKY] should have removed the old configmap and put the new configmap in place", func() {
650651
Eventually(func() bool {
651652
_, err := kubeClient.GetConfigMap(testNamespace, configmapName)
652653
return k8serrors.IsNotFound(err)

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,7 +1795,7 @@ var _ = Describe("Operator Group", func() {
17951795

17961796
// Versions of OLM at 0.14.1 and older had a bug that would place the wrong namespace annotation on copied CSVs,
17971797
// preventing them from being GCd. This ensures that any leftover CSVs in that state are properly cleared up.
1798-
It("cleanup csvs with bad owner operator groups", func() {
1798+
It("[FLAKY] cleanup csvs with bad owner operator groups", func() {
17991799

18001800
c := newKubeClient()
18011801
crc := newCRClient()
@@ -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)