Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
c-pius committed Jan 24, 2025
1 parent 6c7ceb1 commit f4eb1a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions tests/e2e/commontestutils/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ func GetDeployment(ctx context.Context, clnt client.Client,
) (*apiappsv1.Deployment, error) {
deploy := &apiappsv1.Deployment{}
if err := clnt.Get(ctx, client.ObjectKey{Name: name, Namespace: namespace}, deploy); err != nil {
if util.IsNotFound(err) {
return nil, testutils.ErrNotFound
}
return nil, fmt.Errorf("could not get deployment: %w", err)
}
return deploy, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func disableModule(module *v1beta2.Module, kyma *v1beta2.Kyma) {
Should(Succeed())

By("Then Module Operator Deployment is removed")
Eventually(GetDeployment).
Eventually(DeploymentIsReady).
WithContext(ctx).
WithArguments(skrClient, ModuleDeploymentNameInNewerVersion, TestModuleResourceNamespace).
Should(Equal(ErrNotFound))
Expand Down Expand Up @@ -210,13 +210,13 @@ func flickKymaToFastChannel(moduleCR *unstructured.Unstructured,
Should(Succeed())

By("And old Module Operator Deployment still exists")
Consistently(DeploymentIsReady).
Eventually(DeploymentIsReady).
WithContext(ctx).
WithArguments(skrClient, ModuleDeploymentNameInOlderVersion, TestModuleResourceNamespace).
Should(Succeed())

By("And new Module Operator Deployment is not deployed")
Consistently(DeploymentIsReady).
Eventually(DeploymentIsReady).
WithContext(ctx).
WithArguments(skrClient, ModuleDeploymentNameInNewerVersion, TestModuleResourceNamespace).
Should(Equal(ErrNotFound))
Expand Down

0 comments on commit f4eb1a5

Please sign in to comment.