@@ -24,7 +24,10 @@ func Test_BundleToHelmChartConverter_ToHelmChart_ReturnsBundleSourceFailures(t *
24
24
var failingBundleSource FakeBundleSource = func () (bundle.RegistryV1 , error ) {
25
25
return bundle.RegistryV1 {}, errors .New ("some error" )
26
26
}
27
- _ , err := converter .ToHelmChart (failingBundleSource , "install-namespace" , "watch-namespace" )
27
+ config := map [string ]interface {}{
28
+ bundle .BundleConfigWatchNamespaceKey : "watch-namespace" ,
29
+ }
30
+ _ , err := converter .ToHelmChart (failingBundleSource , "install-namespace" , config )
28
31
require .Error (t , err )
29
32
require .Contains (t , err .Error (), "some error" )
30
33
}
@@ -46,7 +49,10 @@ func Test_BundleToHelmChartConverter_ToHelmChart_ReturnsBundleRendererFailures(t
46
49
},
47
50
)
48
51
49
- _ , err := converter .ToHelmChart (b , "install-namespace" , "" )
52
+ config := map [string ]interface {}{
53
+ bundle .BundleConfigWatchNamespaceKey : "" ,
54
+ }
55
+ _ , err := converter .ToHelmChart (b , "install-namespace" , config )
50
56
require .Error (t , err )
51
57
require .Contains (t , err .Error (), "some error" )
52
58
}
@@ -60,7 +66,10 @@ func Test_BundleToHelmChartConverter_ToHelmChart_NoAPIServiceDefinitions(t *test
60
66
},
61
67
)
62
68
63
- _ , err := converter .ToHelmChart (b , "install-namespace" , "" )
69
+ config := map [string ]interface {}{
70
+ bundle .BundleConfigWatchNamespaceKey : "" ,
71
+ }
72
+ _ , err := converter .ToHelmChart (b , "install-namespace" , config )
64
73
require .Error (t , err )
65
74
require .Contains (t , err .Error (), "unsupported bundle: apiServiceDefintions are not supported" )
66
75
}
@@ -76,7 +85,10 @@ func Test_BundleToHelmChartConverter_ToHelmChart_NoWebhooksWithoutCertProvider(t
76
85
},
77
86
)
78
87
79
- _ , err := converter .ToHelmChart (b , "install-namespace" , "" )
88
+ config := map [string ]interface {}{
89
+ bundle .BundleConfigWatchNamespaceKey : "" ,
90
+ }
91
+ _ , err := converter .ToHelmChart (b , "install-namespace" , config )
80
92
require .Error (t , err )
81
93
require .Contains (t , err .Error (), "webhookDefinitions are not supported" )
82
94
}
@@ -92,7 +104,10 @@ func Test_BundleToHelmChartConverter_ToHelmChart_WebhooksSupportDisabled(t *test
92
104
},
93
105
)
94
106
95
- _ , err := converter .ToHelmChart (b , "install-namespace" , "" )
107
+ config := map [string ]interface {}{
108
+ bundle .BundleConfigWatchNamespaceKey : "" ,
109
+ }
110
+ _ , err := converter .ToHelmChart (b , "install-namespace" , config )
96
111
require .Error (t , err )
97
112
require .Contains (t , err .Error (), "webhookDefinitions are not supported" )
98
113
}
@@ -112,7 +127,10 @@ func Test_BundleToHelmChartConverter_ToHelmChart_WebhooksWithCertProvider(t *tes
112
127
},
113
128
)
114
129
115
- _ , err := converter .ToHelmChart (b , "install-namespace" , "" )
130
+ config := map [string ]interface {}{
131
+ bundle .BundleConfigWatchNamespaceKey : "" ,
132
+ }
133
+ _ , err := converter .ToHelmChart (b , "install-namespace" , config )
116
134
require .NoError (t , err )
117
135
}
118
136
@@ -142,7 +160,10 @@ func Test_BundleToHelmChartConverter_ToHelmChart_BundleRendererIntegration(t *te
142
160
},
143
161
)
144
162
145
- _ , err := converter .ToHelmChart (b , expectedInstallNamespace , expectedWatchNamespace )
163
+ config := map [string ]interface {}{
164
+ bundle .BundleConfigWatchNamespaceKey : expectedWatchNamespace ,
165
+ }
166
+ _ , err := converter .ToHelmChart (b , expectedInstallNamespace , config )
146
167
require .NoError (t , err )
147
168
}
148
169
@@ -181,7 +202,10 @@ func Test_BundleToHelmChartConverter_ToHelmChart_Success(t *testing.T) {
181
202
},
182
203
)
183
204
184
- chart , err := converter .ToHelmChart (b , "install-namespace" , "" )
205
+ config := map [string ]interface {}{
206
+ bundle .BundleConfigWatchNamespaceKey : "" ,
207
+ }
208
+ chart , err := converter .ToHelmChart (b , "install-namespace" , config )
185
209
require .NoError (t , err )
186
210
require .NotNil (t , chart )
187
211
require .NotNil (t , chart .Metadata )
0 commit comments