forked from kyma-project/lifecycle-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix propagate warning state (kyma-project#834)
* Include Deleting&Warning State in state mapping for correct propagation * test gh actions e2e setup * Remove ssh step * Check how checkout@3 works * Check how checkout@3 works * Check how checkout@3 works * Check how checkout@3 works * Check how checkout@3 works * Check how checkout@3 works * Check how checkout@3 works * Check how checkout@3 works * Check how checkout@3 works * Test status propagation * Test status propagation * Test status propagation * Test status propagation * Test status propagation * Test status propagation * Test status propagation * Test status propagation * Test status propagation * Test status propagation * Test status propagation * Test status propagation * Test status propagation * Test status propagation * Remove duplicate definition of error var * fetch crds for debug * Make sure kcp context is used * Use matrix to speed up pipeline runtime * Use matrix to speed up pipeline runtime * Use matrix to speed up pipeline runtime
- Loading branch information
1 parent
efb1c76
commit 70913eb
Showing
8 changed files
with
212 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
//go:build status_propagation_e2e | ||
|
||
package e2e_test | ||
|
||
import ( | ||
"time" | ||
|
||
"k8s.io/apimachinery/pkg/api/meta" | ||
|
||
"github.com/kyma-project/lifecycle-manager/api/v1beta2" | ||
"github.com/kyma-project/lifecycle-manager/pkg/testutils" | ||
. "github.com/onsi/ginkgo/v2" | ||
. "github.com/onsi/gomega" | ||
) | ||
|
||
const ( | ||
timeout = 10 * time.Second | ||
statusTimeout = 2 * time.Minute | ||
interval = 1 * time.Second | ||
) | ||
|
||
var _ = Describe("Enable Template Operator, Kyma CR should have status `Warning`", | ||
Ordered, func() { | ||
channel := "regular" | ||
kyma := testutils.NewKymaForE2E("kyma-sample", "kcp-system", channel) | ||
GinkgoWriter.Printf("kyma before create %v\n", kyma) | ||
remoteNamespace := "kyma-system" | ||
|
||
BeforeAll(func() { | ||
// make sure we can list Kymas to ensure CRDs have been installed | ||
err := controlPlaneClient.List(ctx, &v1beta2.KymaList{}) | ||
Expect(meta.IsNoMatchError(err)).To(BeFalse()) | ||
}) | ||
|
||
It("Should create empty Kyma CR on remote cluster", func() { | ||
Eventually(CreateKymaSecret, timeout, interval). | ||
WithContext(ctx). | ||
WithArguments(kyma.GetName(), kyma.GetNamespace(), controlPlaneClient). | ||
Should(Succeed()) | ||
Eventually(controlPlaneClient.Create, timeout, interval). | ||
WithContext(ctx). | ||
WithArguments(kyma). | ||
Should(Succeed()) | ||
By("verifying kyma is ready") | ||
Eventually(CheckKymaIsInState, statusTimeout, interval). | ||
WithContext(ctx). | ||
WithArguments(kyma.GetName(), kyma.GetNamespace(), controlPlaneClient, v1beta2.StateReady). | ||
Should(Succeed()) | ||
By("verifying remote kyma is ready") | ||
Eventually(CheckRemoteKymaCR, statusTimeout, interval). | ||
WithContext(ctx). | ||
WithArguments(remoteNamespace, []v1beta2.Module{}, runtimeClient, v1beta2.StateReady). | ||
Should(Succeed()) | ||
}) | ||
|
||
It("Should enable Template Operator and Kyma should result in Warning status", func() { | ||
By("Enabling Template Operator") | ||
Eventually(EnableModule, timeout, interval). | ||
WithContext(ctx). | ||
WithArguments(kyma.GetName(), kyma.GetNamespace(), "template-operator", "regular", controlPlaneClient). | ||
Should(Succeed()) | ||
By("Checking state of kyma") | ||
Eventually(CheckKymaIsInState, statusTimeout, interval). | ||
WithContext(ctx). | ||
WithArguments(kyma.GetName(), kyma.GetNamespace(), controlPlaneClient, v1beta2.StateWarning). | ||
Should(Succeed()) | ||
}) | ||
|
||
It("Should disable Template Operator and Kyma should result in Ready status", func() { | ||
By("Disabling Template Operator") | ||
Eventually(DisableModule, timeout, interval). | ||
WithContext(ctx). | ||
WithArguments(kyma.GetName(), kyma.GetNamespace(), "template-operator", controlPlaneClient). | ||
Should(Succeed()) | ||
By("Checking state of kyma") | ||
Eventually(CheckKymaIsInState, statusTimeout, interval). | ||
WithContext(ctx). | ||
WithArguments(kyma.GetName(), kyma.GetNamespace(), controlPlaneClient, v1beta2.StateReady). | ||
Should(Succeed()) | ||
}) | ||
|
||
It("Should delete KCP Kyma", func() { | ||
By("Deleting KCP Kyma") | ||
Eventually(controlPlaneClient.Delete, statusTimeout, interval). | ||
WithContext(ctx). | ||
WithArguments(kyma). | ||
Should(Succeed()) | ||
}) | ||
|
||
It("Kyma CR should be removed", func() { | ||
Eventually(CheckKCPKymaCRDeleted, timeout, interval). | ||
WithContext(ctx). | ||
WithArguments(kyma.GetName(), kyma.GetNamespace(), controlPlaneClient). | ||
Should(Succeed()) | ||
}) | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters