|
1 | 1 | package cvo |
2 | 2 |
|
3 | 3 | import ( |
4 | | - . "github.com/onsi/ginkgo/v2" |
5 | | - . "github.com/onsi/gomega" |
| 4 | + "context" |
| 5 | + |
| 6 | + g "github.com/onsi/ginkgo/v2" |
| 7 | + o "github.com/onsi/gomega" |
| 8 | + "github.com/openshift/cluster-version-operator/test/utilities" |
| 9 | + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
6 | 10 | ) |
7 | 11 |
|
8 | | -var _ = Describe("[Jira:Cluster Version Operator] cluster-version-operator-tests", func() { |
9 | | - It("should support passing tests", func() { |
10 | | - Expect(true).To(BeTrue()) |
| 12 | +var _ = g.Describe("[Jira:Cluster Version Operator] cluster-version-operator-tests", g.Label("cvo"), func() { |
| 13 | + defer g.GinkgoRecover() |
| 14 | + |
| 15 | + oc, err := utilities.GetClient() |
| 16 | + o.Expect(err).NotTo(o.HaveOccurred()) |
| 17 | + |
| 18 | + g.It("Author:jianl-High-42543-the removed resources are not created in a fresh installed cluster", g.Label("High", "42543"), func() { |
| 19 | + g.By("Validate resource with 'release.openshift.io/delete: \"true\"' annotation is not installed") |
| 20 | + |
| 21 | + _, err := oc.CoreV1().Services("openshift-cloud-credential-operator").Get(context.TODO(), "controller-manager-service", metav1.GetOptions{}) |
| 22 | + o.Expect(err).To(o.HaveOccurred(), "Service controller-manager-service was accidentally installed") |
| 23 | + |
| 24 | + _, err = oc.RbacV1().ClusterRoleBindings().Get(context.TODO(), "default-account-openshift-machine-config-operator", metav1.GetOptions{}) |
| 25 | + o.Expect(err).To(o.HaveOccurred(), "ClusterRoleBinding default-account-openshift-machine-config-operator was accidentally installed") |
| 26 | + |
| 27 | + _, err = oc.BatchV1().CronJobs("openshift-machine-config-operator").Get(context.TODO(), "machine-config-nodes-crd-cleanup", metav1.GetOptions{}) |
| 28 | + o.Expect(err).To(o.HaveOccurred(), "CronJob machine-config-nodes-crd-cleanup was accidentally installed") |
11 | 29 | }) |
12 | 30 | }) |
0 commit comments