mirror of
https://github.com/mariadb-operator/mariadb-operator.git
synced 2025-08-11 23:55:17 +00:00
Update MaxScale test
This commit is contained in:
@ -408,15 +408,6 @@ func testMaxscale(mdb *mariadbv1alpha1.MariaDB, mxs *mariadbv1alpha1.MaxScale) {
|
|||||||
var guiSvc corev1.Service
|
var guiSvc corev1.Service
|
||||||
Expect(k8sClient.Get(testCtx, mxs.GuiServiceKey(), &guiSvc)).To(Succeed())
|
Expect(k8sClient.Get(testCtx, mxs.GuiServiceKey(), &guiSvc)).To(Succeed())
|
||||||
|
|
||||||
By("Expecting Connection to be ready eventually")
|
|
||||||
Eventually(func() bool {
|
|
||||||
var conn mariadbv1alpha1.Connection
|
|
||||||
if err := k8sClient.Get(testCtx, mxs.ConnectionKey(), &conn); err != nil {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return conn.IsReady()
|
|
||||||
}, testTimeout, testInterval).Should(BeTrue())
|
|
||||||
|
|
||||||
type secretRef struct {
|
type secretRef struct {
|
||||||
name string
|
name string
|
||||||
keySelector corev1.SecretKeySelector
|
keySelector corev1.SecretKeySelector
|
||||||
@ -461,6 +452,15 @@ func testMaxscale(mdb *mariadbv1alpha1.MariaDB, mxs *mariadbv1alpha1.MaxScale) {
|
|||||||
expectSecretToExist(testCtx, k8sClient, key, secretKeyRef.keySelector.Key)
|
expectSecretToExist(testCtx, k8sClient, key, secretKeyRef.keySelector.Key)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
By("Expecting Connection to be ready eventually")
|
||||||
|
Eventually(func() bool {
|
||||||
|
var conn mariadbv1alpha1.Connection
|
||||||
|
if err := k8sClient.Get(testCtx, mxs.ConnectionKey(), &conn); err != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return conn.IsReady()
|
||||||
|
}, testHighTimeout, testInterval).Should(BeTrue())
|
||||||
|
|
||||||
if mxs.AreMetricsEnabled() {
|
if mxs.AreMetricsEnabled() {
|
||||||
By("Expecting to create a exporter Deployment eventually")
|
By("Expecting to create a exporter Deployment eventually")
|
||||||
Eventually(func(g Gomega) bool {
|
Eventually(func(g Gomega) bool {
|
||||||
|
Reference in New Issue
Block a user