@@ -57,7 +57,7 @@ func TestFeatureEnableStatus(t *testing.T) {
57
57
}{
58
58
"Should be false when required resources does not exist" : {
59
59
feature : sampleFeature (func (in * uiapi.Feature ) {
60
- in .Spec .Requirements .Resources = []metav1.GroupVersionKind {
60
+ in .Spec .ReadinessChecks .Resources = []metav1.GroupVersionKind {
61
61
{
62
62
Group : "foo.io" ,
63
63
Version : "v1" ,
@@ -69,7 +69,7 @@ func TestFeatureEnableStatus(t *testing.T) {
69
69
},
70
70
"Should be true when required workload exist" : {
71
71
feature : sampleFeature (func (in * uiapi.Feature ) {
72
- in .Spec .Requirements .Workloads = []uiapi.WorkloadInfo {
72
+ in .Spec .ReadinessChecks .Workloads = []uiapi.WorkloadInfo {
73
73
{
74
74
GroupVersionKind : metav1.GroupVersionKind {
75
75
Group : "apps" ,
@@ -85,7 +85,7 @@ func TestFeatureEnableStatus(t *testing.T) {
85
85
},
86
86
"Should be true when required workload does not exist but HelmRelease exist" : {
87
87
feature : sampleFeature (func (in * uiapi.Feature ) {
88
- in .Spec .Requirements .Workloads = []uiapi.WorkloadInfo {
88
+ in .Spec .ReadinessChecks .Workloads = []uiapi.WorkloadInfo {
89
89
{
90
90
GroupVersionKind : metav1.GroupVersionKind {
91
91
Group : "apps" ,
@@ -101,7 +101,7 @@ func TestFeatureEnableStatus(t *testing.T) {
101
101
},
102
102
"Should be false when neither workload nor HelmRelease exist" : {
103
103
feature : sampleFeature (func (in * uiapi.Feature ) {
104
- in .Spec .Requirements .Workloads = []uiapi.WorkloadInfo {
104
+ in .Spec .ReadinessChecks .Workloads = []uiapi.WorkloadInfo {
105
105
{
106
106
GroupVersionKind : metav1.GroupVersionKind {
107
107
Group : "apps" ,
@@ -160,7 +160,7 @@ func TestFeatureReadyStatus(t *testing.T) {
160
160
"Should not be ready when dependency is not satisfied" : {
161
161
feature : sampleFeature (func (in * uiapi.Feature ) {
162
162
in .Spec .Requirements .Features = []string {"foo" , "bar" }
163
- in .Spec .Requirements .Workloads = []uiapi.WorkloadInfo {
163
+ in .Spec .ReadinessChecks .Workloads = []uiapi.WorkloadInfo {
164
164
{
165
165
GroupVersionKind : metav1.GroupVersionKind {
166
166
Group : "apps" ,
@@ -177,7 +177,7 @@ func TestFeatureReadyStatus(t *testing.T) {
177
177
},
178
178
"Should not be ready when the workload does not exit" : {
179
179
feature : sampleFeature (func (in * uiapi.Feature ) {
180
- in .Spec .Requirements .Workloads = []uiapi.WorkloadInfo {
180
+ in .Spec .ReadinessChecks .Workloads = []uiapi.WorkloadInfo {
181
181
{
182
182
GroupVersionKind : metav1.GroupVersionKind {
183
183
Group : "apps" ,
@@ -193,7 +193,7 @@ func TestFeatureReadyStatus(t *testing.T) {
193
193
},
194
194
"Should not be ready when workload exist but HelmRelease does not exist" : {
195
195
feature : sampleFeature (func (in * uiapi.Feature ) {
196
- in .Spec .Requirements .Workloads = []uiapi.WorkloadInfo {
196
+ in .Spec .ReadinessChecks .Workloads = []uiapi.WorkloadInfo {
197
197
{
198
198
GroupVersionKind : metav1.GroupVersionKind {
199
199
Group : "apps" ,
@@ -209,7 +209,7 @@ func TestFeatureReadyStatus(t *testing.T) {
209
209
},
210
210
"Should not be ready when workload exist but HelmRelease is not ready " : {
211
211
feature : sampleFeature (func (in * uiapi.Feature ) {
212
- in .Spec .Requirements .Workloads = []uiapi.WorkloadInfo {
212
+ in .Spec .ReadinessChecks .Workloads = []uiapi.WorkloadInfo {
213
213
{
214
214
GroupVersionKind : metav1.GroupVersionKind {
215
215
Group : "apps" ,
@@ -233,7 +233,7 @@ func TestFeatureReadyStatus(t *testing.T) {
233
233
},
234
234
"Should be ready when workload exist and HelmRelease is ready" : {
235
235
feature : sampleFeature (func (in * uiapi.Feature ) {
236
- in .Spec .Requirements .Workloads = []uiapi.WorkloadInfo {
236
+ in .Spec .ReadinessChecks .Workloads = []uiapi.WorkloadInfo {
237
237
{
238
238
GroupVersionKind : metav1.GroupVersionKind {
239
239
Group : "apps" ,
@@ -311,7 +311,7 @@ func TestFeatureManagedStatus(t *testing.T) {
311
311
}{
312
312
"Managed should be true when HelmRelease exist" : {
313
313
feature : sampleFeature (func (in * uiapi.Feature ) {
314
- in .Spec .Requirements .Workloads = []uiapi.WorkloadInfo {
314
+ in .Spec .ReadinessChecks .Workloads = []uiapi.WorkloadInfo {
315
315
{
316
316
GroupVersionKind : metav1.GroupVersionKind {
317
317
Group : "apps" ,
@@ -328,7 +328,7 @@ func TestFeatureManagedStatus(t *testing.T) {
328
328
},
329
329
"Managed should be false when HelmRelease does not exist" : {
330
330
feature : sampleFeature (func (in * uiapi.Feature ) {
331
- in .Spec .Requirements .Workloads = []uiapi.WorkloadInfo {
331
+ in .Spec .ReadinessChecks .Workloads = []uiapi.WorkloadInfo {
332
332
{
333
333
GroupVersionKind : metav1.GroupVersionKind {
334
334
Group : "apps" ,
0 commit comments