Skip to content

Commit

Permalink
Tests: Add basic test for dashboard existence
Browse files Browse the repository at this point in the history
A quick test that checks if the dashboards exists.

Signed-off-by: Jacob Baungard Hansen <[email protected]>
  • Loading branch information
jacobbaungard committed May 27, 2024
1 parent 24afdf4 commit 37e03e5
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions tests/pkg/tests/observability_dashboard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ import (
)

const (
dashboardName = "sample-dashboard"
dashboardTitle = "Sample Dashboard for E2E"
updateDashboardTitle = "Update Sample Dashboard for E2E"
dashboardName = "sample-dashboard"
dashboardTitle = "Sample Dashboard for E2E"
updateDashboardTitle = "Update Sample Dashboard for E2E"
clusterOverviewTitle = "ACM - Clusters Overview"
clusterOverviewOptimizedTitle = "ACM - Clusters Overview (Optimized)"
)

var _ = Describe("Observability:", func() {
Expand Down Expand Up @@ -89,4 +91,30 @@ var _ = Describe("Observability:", func() {
}
testFailed = testFailed || CurrentGinkgoTestDescription().Failed
})


It("[P2][Sev2][observability][Stable] Should have default overview dashboards (dashboard/g0)", func() {
// Check Original dash exists
Eventually(func() bool {
_, result := utils.ContainDashboard(testOptions, clusterOverviewTitle)
return result
}, EventuallyTimeoutMinute*3, EventuallyIntervalSecond*5).Should(BeFalse())
// Check optimized dash
Eventually(func() bool {
_, result := utils.ContainDashboard(testOptions, clusterOverviewOptimizedTitle)
return result
}, EventuallyTimeoutMinute*3, EventuallyIntervalSecond*5).Should(BeFalse())

})

JustAfterEach(func() {
Expect(utils.IntegrityChecking(testOptions)).NotTo(HaveOccurred())
})

AfterEach(func() {
if CurrentGinkgoTestDescription().Failed {
utils.LogFailingTestStandardDebugInfo(testOptions)
}
testFailed = testFailed || CurrentGinkgoTestDescription().Failed
})
})

0 comments on commit 37e03e5

Please sign in to comment.