-
Notifications
You must be signed in to change notification settings - Fork 232
/
Copy pathoperator_test.go
40 lines (33 loc) · 1.18 KB
/
operator_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package nmstate
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/openshift/assisted-service/internal/common"
"github.com/openshift/assisted-service/internal/operators/api"
"github.com/openshift/assisted-service/models"
)
var _ = Describe("NMState Operator", func() {
var (
log = common.GetTestLog()
operator api.Operator
bundle = []string{"virtualization"}
)
Context("operator", func() {
BeforeEach(func() {
operator = NewNmstateOperator(log)
})
It("should return the right validations ids", func() {
Expect(operator.GetClusterValidationID()).To(Equal(string(models.ClusterValidationIDNmstateRequirementsSatisfied)))
Expect(operator.GetHostValidationID()).To(Equal(string(models.HostValidationIDNmstateRequirementsSatisfied)))
})
It("should return the right feature support id", func() {
Expect(operator.GetFeatureSupportID()).To(Equal(models.FeatureSupportLevelIDNMSTATE))
})
It("should return no dependencies", func() {
Expect(operator.GetDependencies(&common.Cluster{})).To(HaveLen(0))
})
It("should return the right feature support id", func() {
Expect(operator.GetBundleLabels()).To(Equal(bundle))
})
})
})