Skip to content

Commit

Permalink
Check strimiz subscription in integration test (#877)
Browse files Browse the repository at this point in the history
* Check strimiz subscription in integration test

Signed-off-by: clyang82 <[email protected]>

* Fix format issue

Signed-off-by: clyang82 <[email protected]>

---------

Signed-off-by: clyang82 <[email protected]>
  • Loading branch information
clyang82 authored Apr 11, 2024
1 parent b5a3de3 commit 1ad66d4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions operator/pkg/controllers/hubofhubs/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/kylelemons/godebug/diff"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
subv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1"
mchv1 "github.com/stolostron/multiclusterhub-operator/api/v1"
"gopkg.in/yaml.v2"
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
Expand Down Expand Up @@ -943,6 +944,16 @@ var _ = Describe("MulticlusterGlobalHub controller", Ordered, func() {
return err
}

// should have kafka subscription created
existingSub := &subv1alpha1.Subscription{}
err = k8sClient.Get(ctx, types.NamespacedName{
Name: transportprotocol.DefaultKafkaSubName,
Namespace: commonutils.GetDefaultNamespace(),
}, existingSub)
if err != nil && !errors.IsNotFound(err) {
return fmt.Errorf("subscription %s is not created due to %v", transportprotocol.DefaultKafkaSubName, err)
}

// postgres should be ready in envtest
// kafka should be ready in envtest

Expand Down

0 comments on commit 1ad66d4

Please sign in to comment.