зеркало из https://github.com/Azure/ARO-RP.git
Merge pull request #1153 from jim-minter/e2efix-routefix
disable routefix e2e test in prod for now
This commit is contained in:
Коммит
91029626d6
|
@ -14,13 +14,13 @@ import (
|
|||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
"k8s.io/client-go/kubernetes/scheme"
|
||||
"k8s.io/client-go/rest"
|
||||
ctrl "sigs.k8s.io/controller-runtime"
|
||||
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
|
||||
"sigs.k8s.io/controller-runtime/pkg/reconcile"
|
||||
|
||||
arov1alpha1 "github.com/Azure/ARO-RP/pkg/operator/apis/aro.openshift.io/v1alpha1"
|
||||
"github.com/Azure/ARO-RP/pkg/operator/clientset/versioned/scheme"
|
||||
aroclient "github.com/Azure/ARO-RP/pkg/operator/clientset/versioned/typed/aro.openshift.io/v1alpha1"
|
||||
"github.com/Azure/ARO-RP/pkg/operator/controllers"
|
||||
"github.com/Azure/ARO-RP/pkg/util/dynamichelper"
|
||||
|
|
|
@ -116,12 +116,6 @@ var _ = Describe("ARO Operator - Internet checking", func() {
|
|||
})
|
||||
|
||||
var _ = Describe("ARO Operator - Geneva Logging", func() {
|
||||
BeforeEach(func() {
|
||||
_, err := clients.AROClusters.Clusters().Get(context.Background(), "cluster", metav1.GetOptions{})
|
||||
if errors.IsNotFound(err) {
|
||||
Skip("skipping tests as aro-operator is not deployed")
|
||||
}
|
||||
})
|
||||
Specify("genevalogging must be repaired if deployment deleted", func() {
|
||||
mdsdReady := ready.CheckDaemonSetIsReady(context.Background(), clients.Kubernetes.AppsV1().DaemonSets("openshift-azure-logging"), "mdsd")
|
||||
|
||||
|
@ -134,7 +128,7 @@ var _ = Describe("ARO Operator - Geneva Logging", func() {
|
|||
err = clients.Kubernetes.AppsV1().DaemonSets("openshift-azure-logging").Delete(context.Background(), "mdsd", metav1.DeleteOptions{})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
// Wait for it to be fixed
|
||||
// wait for it to be fixed
|
||||
err = wait.PollImmediate(30*time.Second, 15*time.Minute, mdsdReady)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
|
@ -150,26 +144,25 @@ var _ = Describe("ARO Operator - Geneva Logging", func() {
|
|||
})
|
||||
|
||||
var _ = Describe("ARO Operator - Routefix Daemonset", func() {
|
||||
BeforeEach(func() {
|
||||
_, err := clients.AROClusters.Clusters().Get(context.Background(), "cluster", metav1.GetOptions{})
|
||||
if errors.IsNotFound(err) {
|
||||
Skip("skipping tests as aro-operator is not deployed")
|
||||
}
|
||||
Specify("routefix must be repaired if daemonset is deleted", func() {
|
||||
dsReady := ready.CheckDaemonSetIsReady(context.Background(), clients.Kubernetes.AppsV1().DaemonSets("openshift-azure-routefix"), "routefix")
|
||||
err := wait.PollImmediate(30*time.Second, 15*time.Minute, dsReady)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
// remove this once the change where the operator manages the routefix
|
||||
// daemonset is in production
|
||||
BeforeEach(skipIfNotInDevelopmentEnv)
|
||||
|
||||
//delete the routefix daemonset
|
||||
err = clients.Kubernetes.AppsV1().DaemonSets("openshift-azure-routefix").Delete(context.Background(), "routefix", metav1.DeleteOptions{})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Specify("routefix must be repaired if daemonset is deleted", func() {
|
||||
dsReady := ready.CheckDaemonSetIsReady(context.Background(), clients.Kubernetes.AppsV1().DaemonSets("openshift-azure-routefix"), "routefix")
|
||||
|
||||
//wait for it to be fixed
|
||||
err = wait.PollImmediate(30*time.Second, 15*time.Minute, dsReady)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
err := wait.PollImmediate(30*time.Second, 15*time.Minute, dsReady)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
_, err = clients.Kubernetes.AppsV1().DaemonSets("openshift-azure-routefix").Get(context.Background(), "routefix", metav1.GetOptions{})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
})
|
||||
// delete the routefix daemonset
|
||||
err = clients.Kubernetes.AppsV1().DaemonSets("openshift-azure-routefix").Delete(context.Background(), "routefix", metav1.DeleteOptions{})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
// wait for it to be fixed
|
||||
err = wait.PollImmediate(30*time.Second, 15*time.Minute, dsReady)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
_, err = clients.Kubernetes.AppsV1().DaemonSets("openshift-azure-routefix").Get(context.Background(), "routefix", metav1.GetOptions{})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
})
|
||||
})
|
||||
|
|
Загрузка…
Ссылка в новой задаче