@@ -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
+ config [bundle .BundleConfigInstallNamespaceKey ] = "install-namespace"
29
+ config [bundle .BundleConfigWatchNamespaceKey ] = "watch-namespace"
30
+ _ , err := converter .ToHelmChart (failingBundleSource , 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
+ config [bundle .BundleConfigInstallNamespaceKey ] = "install-namespace"
54
+ config [bundle .BundleConfigWatchNamespaceKey ] = ""
55
+ _ , err := converter .ToHelmChart (b , 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
+ config ["installNamespace" ] = "install-namespace"
71
+ config ["watchNamespace" ] = ""
72
+ _ , err := converter .ToHelmChart (b , 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
+ config [bundle .BundleConfigInstallNamespaceKey ] = "install-namespace"
90
+ config [bundle .BundleConfigWatchNamespaceKey ] = ""
91
+ _ , err := converter .ToHelmChart (b , 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
+ config [bundle .BundleConfigInstallNamespaceKey ] = "install-namespace"
109
+ config [bundle .BundleConfigWatchNamespaceKey ] = ""
110
+ _ , err := converter .ToHelmChart (b , 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
+ config [bundle .BundleConfigInstallNamespaceKey ] = "install-namespace"
132
+ config [bundle .BundleConfigWatchNamespaceKey ] = ""
133
+ _ , err := converter .ToHelmChart (b , 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
+ config [bundle .BundleConfigInstallNamespaceKey ] = expectedInstallNamespace
165
+ config [bundle .BundleConfigWatchNamespaceKey ] = expectedWatchNamespace
166
+ _ , err := converter .ToHelmChart (b , 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
+ config [bundle .BundleConfigWatchNamespaceKey ] = ""
207
+ config [bundle .BundleConfigInstallNamespaceKey ] = "install-namespace"
208
+ chart , err := converter .ToHelmChart (b , config )
185
209
require .NoError (t , err )
186
210
require .NotNil (t , chart )
187
211
require .NotNil (t , chart .Metadata )
0 commit comments