Skip to content

Commit

Permalink
Add e2e validation for cluster machine approver cluster operator status
Browse files Browse the repository at this point in the history
Since we added support for the machine approver cluster operator, we want to validate it works as expected.
openshift/cluster-machine-approver#71
  • Loading branch information
enxebre committed May 12, 2020
1 parent d2cc99d commit 85750e7
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions pkg/operators/cluster-machine-approver.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package operators

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/openshift/cluster-api-actuator-pkg/pkg/framework"
runtimeclient "sigs.k8s.io/controller-runtime/pkg/client"
)

const (
cmaDeployment = "machine-approver"
cmaClusterOperator = "machine-approver"
)

var _ = Describe("[Feature:Operators] Cluster Machine Approver deployment", func() {
var client runtimeclient.Client
var err error
client, err = framework.LoadClient()
Expect(err).NotTo(HaveOccurred())

It("should be available", func() {
Expect(framework.IsDeploymentAvailable(client, cmaDeployment)).To(BeTrue())
})
})

var _ = Describe("[Feature:Operators] Cluster Machine Approver Cluster Operator Status", func() {
var client runtimeclient.Client
var err error
client, err = framework.LoadClient()
Expect(err).NotTo(HaveOccurred())

It("should be available", func() {
Expect(framework.IsStatusAvailable(client, cmaClusterOperator)).To(BeTrue())
})
})

0 comments on commit 85750e7

Please sign in to comment.