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

chore: add more httpingress integration tests #868

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

wesbillman
Copy link
Collaborator

No description provided.

Comment on lines 116 to 120
respBodyStr := strings.Trim(string(resp.bodyBytes), "\"")
decodedBody, err := base64.StdEncoding.DecodeString(respBodyStr)
if err != nil {
t.Fatalf("Failed to decode base64: %v", err)
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@alecthomas maybe I should change the behavior of the []byte response to already be decoded? So that if we send bytes to an ingress and return them, they should match? Whatcha think?

@wesbillman wesbillman force-pushed the add-more-http-ingress-testing branch from 2534d4d to 73d4675 Compare February 1, 2024 22:38
@wesbillman wesbillman force-pushed the add-more-http-ingress-testing branch from 73d4675 to 1925465 Compare February 1, 2024 23:00

return body, nil
case *schema.Bytes:
var base64String string
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think if you make this a []byte then json.Unmarshal will Just Work

@wesbillman wesbillman merged commit 73fa3e8 into main Feb 2, 2024
11 checks passed
@wesbillman wesbillman deleted the add-more-http-ingress-testing branch February 2, 2024 04:16
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