Merge pull request #11337 from dinever/improve-olm-test

fix flaky OLM addon test by increasing timeout limit
pull/11349/head
Medya Ghazizadeh 2021-05-07 19:41:13 -07:00 committed by GitHub
commit a1de28589f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 3 deletions

View File

@ -462,7 +462,6 @@ func validateHelmTillerAddon(ctx context.Context, t *testing.T, profile string)
// validateOlmAddon tests the OLM addon
func validateOlmAddon(ctx context.Context, t *testing.T, profile string) {
t.Skip("skipping olm test till this issue is fixed https://github.com/kubernetes/minikube/issues/11311")
defer PostMortemLogs(t, profile)
client, err := kapi.Client(profile)
@ -498,7 +497,7 @@ func validateOlmAddon(ctx context.Context, t *testing.T, profile string) {
}
// Install one sample Operator such as etcd
rr, err := Run(t, exec.CommandContext(ctx, "kubectl", "--context", profile, "create", "-f", "https://operatorhub.io/install/etcd.yaml"))
rr, err := Run(t, exec.CommandContext(ctx, "kubectl", "--context", profile, "create", "-f", filepath.Join(*testdataDir, "etcd.yaml")))
if err != nil {
t.Logf("etcd operator installation with %s failed: %v", rr.Command(), err)
}
@ -519,7 +518,7 @@ func validateOlmAddon(ctx context.Context, t *testing.T, profile string) {
}
// Operator installation takes a while
if err := retry.Expo(checkOperatorInstalled, time.Second*3, Minutes(6)); err != nil {
if err := retry.Expo(checkOperatorInstalled, time.Second*3, Minutes(10)); err != nil {
t.Errorf("failed checking operator installed: %v", err.Error())
}
}

24
test/integration/testdata/etcd.yaml vendored Normal file
View File

@ -0,0 +1,24 @@
apiVersion: v1
kind: Namespace
metadata:
name: my-etcd
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: operatorgroup
namespace: my-etcd
spec:
targetNamespaces:
- my-etcd
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: my-etcd
namespace: my-etcd
spec:
channel: singlenamespace-alpha
name: etcd
source: operatorhubio-catalog
sourceNamespace: olm