forked from openshift/cluster-api-actuator-pkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add e2e validation for cluster machine approver cluster operator status
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
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()) | ||
}) | ||
}) |