Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump uptest to v0.6.0 #913

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

ulucinar
Copy link
Collaborator

@ulucinar ulucinar commented Oct 9, 2023

Description of your changes

  • This activates the resource import and resource update tests.
  • For now, we don't specify a default update parameter at the provider level, and resource update tests will currently need to be enabled with the "uptest.upbound.io/update-parameter" annotation in the example manifest on a per-resource basis.
  • uptest now also has more verbose logging to make troubleshooting uptest runs a little bit easier :)

Resource import tests make sure that the external resource state can be re-imported in case the local state is lost, for instance, due to a pod restart and the managed resource stays in Synced == True, Ready == True state. The optional resource update tests update a designated spec.forProvider field (the desired state) and assert that the updated value becomes available at status.atProvider (the actual state) and the managed resource stays at the Synced == True, Ready == True state. The spec.forProvider field to be used in the update tests for a specific resource can be specified with the uptest.upbound.io/update-parameter in the resource's example manifest to be tested with uptest:

...
metadata:
  annotations:
    uptest.upbound.io/update-parameter: '{"tags":{"update-test-tag":"val"}}'

I have:

  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Manually tested with the examples/ec2/vpc.yaml manifest.

- This activates the resource import and resource update tests.
- For now, we don't specify a default update parameter at the
  provider level, and resource update tests will currently
  need to be enabled with the "uptest.upbound.io/update-parameter"
  annotation in the example manifest on a per-resource basis.

Signed-off-by: Alper Rifat Ulucinar <[email protected]>
@ulucinar ulucinar force-pushed the bump-uptest-v0.6.0 branch from e510c3b to c3a1a39 Compare October 9, 2023 14:37
Copy link
Collaborator

@turkenf turkenf left a comment

Choose a reason for hiding this comment

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

Thank you @ulucinar, LGTM.

@ulucinar ulucinar merged commit 84f7deb into crossplane-contrib:main Oct 9, 2023
8 checks passed
@ulucinar ulucinar deleted the bump-uptest-v0.6.0 branch October 9, 2023 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants