chore: Adjust e2e tests for createdAt and createdBy new v1alpha Project.Spec fields #144
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
With the introduction of new server-side computed fields for v1alpha Project.Spec:
createdAt
andcreatedBy
the tests started failing as the helper function_assert_objects_existence
was comparing almost the whole object.This is too much for a simple assertion that checks if the object was actually applied, so I added additional filter to re-map the objects, extracting the basic minimum for comparison.
Ref: https://github.com/nobl9/sloctl/actions/runs/9466510383/job/26078347437
Related Changes
Testing
Run
make test/e2e
, remember about supplying the right env vars OR run https://github.com/nobl9/sloctl/actions/workflows/e2e-tests-dispatch.yml with this branch as target.