Skip to content

Conversation

@k15r
Copy link
Contributor

@k15r k15r commented Dec 1, 2025

Description

Changes proposed in this pull request (what was done and why):

  • sort resources
  • automatic sorting, readinessChecks and cleanup for tests

Changes refer to particular issues, PRs or documents:

Traceability

  • The PR is linked to a GitHub issue.
  • The follow-up issues (if any) are linked in the Related Issues section.
  • If the change is user-facing, the documentation has been adjusted.
  • If a CRD is changed, the corresponding Busola ConfigMap has been adjusted.
  • The feature is unit-tested.
  • The feature is e2e-tested.

@k15r k15r requested review from a team as code owners December 1, 2025 15:25
@github-actions github-actions bot added this to the 1.54.0 milestone Dec 1, 2025
@github-actions github-actions bot added the kind/chore Categorizes issue or PR as related to a chore. label Dec 1, 2025
NHingerl
NHingerl previously approved these changes Dec 2, 2025
@k15r k15r added the area/tests Writing/adding/Refactoring tests or checks label Dec 2, 2025
testutils "github.com/kyma-project/telemetry-manager/internal/utils/test"
"github.com/kyma-project/telemetry-manager/test/testkit/assert"
kitk8s "github.com/kyma-project/telemetry-manager/test/testkit/k8s"
"github.com/kyma-project/telemetry-manager/test/testkit/k8s/objects"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"github.com/kyma-project/telemetry-manager/test/testkit/k8s/objects"
kitk8sobjects "github.com/kyma-project/telemetry-manager/test/testkit/k8s/objects"

let's use the alias here the same way you did it in the actual tests

name types.NamespacedName,
resourceName string,
) {
type ReadinessCheckFunc func(t *testing.T, name types.NamespacedName) (bool, error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to export this type?

return nil
}

func AllObjectsDeleted(resources ...client.Object) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to export this function?

return nil
}

func DeleteObjectsIgnoringNotFound(resources ...client.Object) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to export this function?

return labelMatches(labels, kitk8sobjects.PersistentLabelName, "true")
}

func ResetTelemetryResource(t *testing.T, previous operatorv1alpha1.Telemetry) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to export this function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tests Writing/adding/Refactoring tests or checks kind/chore Categorizes issue or PR as related to a chore.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants