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

fix debug response when a response var is present #9

Merged
merged 1 commit into from
May 7, 2024

Conversation

gotwarlost
Copy link
Collaborator

Previously, the entire response returned by cue was also the crossplane response so it made sense to dump it as-is such that users could copy the request and response objects unmodified into their unit tests.

Now that we support extracting a variable from the response, we need to replay it back with that variable such that copying the debug response output unmodified yields a correct test. That is, we do the same processing for responses as we do for requests.

Previously, the entire response returned by cue was also the crossplane
response so it made sense to dump it as-is such that users could
copy the request and response objects unmodified into their unit tests.

Now that we support extracting a variable from the response, we need to
replay it back with that variable such that copying the debug response output
unmodified yields a correct test. That is, we do the same processing for
responses as we do for requests.

Signed-off-by: gotwarlost <krishnan.anantheswaran@elastic.co>
@gotwarlost gotwarlost merged commit a4ef7be into crossplane-contrib:main May 7, 2024
5 checks passed
@gotwarlost gotwarlost deleted the debug-response branch May 7, 2024 16:38
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.

None yet

2 participants