@@ -194,51 +194,51 @@ var _ = Describe("InstallDashboard", func() {
194
194
195
195
var _ = Describe ("GetInstalledDashboard" , func () {
196
196
var (
197
- fakeContext context.Context
198
- // fakeClientWithHelmReleases client.WithWatch
199
- fakeClientWithDeployments client.WithWatch
200
- blankClient client.WithWatch
201
- errorClient ErroringFakeClient
197
+ fakeContext context.Context
198
+ fakeClientWithHelmReleases client.WithWatch
199
+ fakeClientWithDeployments client.WithWatch
200
+ blankClient client.WithWatch
201
+ errorClient ErroringFakeClient
202
202
)
203
203
204
204
BeforeEach (func () {
205
205
fakeContext = context .Background ()
206
206
scheme , err := kube .CreateScheme ()
207
207
Expect (err ).NotTo (HaveOccurred ())
208
208
209
- // fakeClientWithHelmReleases = fake.NewClientBuilder().WithScheme(scheme).WithRuntimeObjects(helmReleaseFixtures...).Build()
209
+ fakeClientWithHelmReleases = fake .NewClientBuilder ().WithScheme (scheme ).WithRuntimeObjects (helmReleaseFixtures ... ).Build ()
210
210
fakeClientWithDeployments = fake .NewClientBuilder ().WithScheme (scheme ).WithRuntimeObjects (deploymentFixtures ... ).Build ()
211
211
blankClient = fake .NewClientBuilder ().WithScheme (scheme ).Build ()
212
212
errorClient = ErroringFakeClient {}
213
213
})
214
214
215
- // It("returns the oss dashboard type if the dashboard is installed with a helmrelease", func() {
216
- // dashboardType, dashboardName, err := GetInstalledDashboard(fakeContext, fakeClientWithHelmReleases, testNamespace, map[DashboardType]bool{
217
- // DashboardTypeOSS: true,
218
- // })
219
- // Expect(err).ToNot(HaveOccurred())
220
- // Expect(dashboardType).To(Equal(DashboardTypeOSS))
221
- // Expect(dashboardName).To(Equal("dashboard-2"))
222
- // })
223
- //
224
- // It("returns the enterprise dashboard type if the dashboard is installed with a helmrelease", func() {
225
- // dashboardType, dashboardName, err := GetInstalledDashboard(fakeContext, fakeClientWithHelmReleases, testNamespace, map[DashboardType]bool{
226
- // DashboardTypeEnterprise: true,
227
- // })
228
- // Expect(err).ToNot(HaveOccurred())
229
- // Expect(dashboardType).To(Equal(DashboardTypeEnterprise))
230
- // Expect(dashboardName).To(Equal("dashboard-3"))
231
- // })
232
- //
233
- // It("returns the enterprise dashboard type if both dashboards are installed with a helmrelease", func() {
234
- // dashboardType, dashboardName, err := GetInstalledDashboard(fakeContext, fakeClientWithHelmReleases, testNamespace, map[DashboardType]bool{
235
- // DashboardTypeOSS: true,
236
- // DashboardTypeEnterprise: true,
237
- // })
238
- // Expect(err).ToNot(HaveOccurred())
239
- // Expect(dashboardType).To(Equal(DashboardTypeEnterprise))
240
- // Expect(dashboardName).To(Equal("dashboard-3"))
241
- // })
215
+ It ("returns the oss dashboard type if the dashboard is installed with a helmrelease" , func () {
216
+ dashboardType , dashboardName , err := GetInstalledDashboard (fakeContext , fakeClientWithHelmReleases , testNamespace , map [DashboardType ]bool {
217
+ DashboardTypeOSS : true ,
218
+ })
219
+ Expect (err ).ToNot (HaveOccurred ())
220
+ Expect (dashboardType ).To (Equal (DashboardTypeOSS ))
221
+ Expect (dashboardName ).To (Equal ("dashboard-2" ))
222
+ })
223
+
224
+ It ("returns the enterprise dashboard type if the dashboard is installed with a helmrelease" , func () {
225
+ dashboardType , dashboardName , err := GetInstalledDashboard (fakeContext , fakeClientWithHelmReleases , testNamespace , map [DashboardType ]bool {
226
+ DashboardTypeEnterprise : true ,
227
+ })
228
+ Expect (err ).ToNot (HaveOccurred ())
229
+ Expect (dashboardType ).To (Equal (DashboardTypeEnterprise ))
230
+ Expect (dashboardName ).To (Equal ("dashboard-3" ))
231
+ })
232
+
233
+ It ("returns the enterprise dashboard type if both dashboards are installed with a helmrelease" , func () {
234
+ dashboardType , dashboardName , err := GetInstalledDashboard (fakeContext , fakeClientWithHelmReleases , testNamespace , map [DashboardType ]bool {
235
+ DashboardTypeOSS : true ,
236
+ DashboardTypeEnterprise : true ,
237
+ })
238
+ Expect (err ).ToNot (HaveOccurred ())
239
+ Expect (dashboardType ).To (Equal (DashboardTypeEnterprise ))
240
+ Expect (dashboardName ).To (Equal ("dashboard-3" ))
241
+ })
242
242
243
243
It ("returns the oss dashboard type if the dashboard is installed with a deployment only" , func () {
244
244
dashboardType , dashboardName , err := GetInstalledDashboard (fakeContext , fakeClientWithDeployments , testNamespace , map [DashboardType ]bool {
0 commit comments