-
Notifications
You must be signed in to change notification settings - Fork 67
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 possible nil-pointer error; add golden test for set-name-prefix #926
base: master
Are you sure you want to change the base?
Fix possible nil-pointer error; add golden test for set-name-prefix #926
Conversation
@yuwenma do we have a golden test somewhere? I've copied this from my playground, but I feel like we've both been iterating on the idea... |
56aa3bb
to
321d46a
Compare
I uploaded the golden test in the SDK, with an example using the new test infra. That PR borrows lots of the code from this PR and rewrote the part with the latest go sdk changes: Feel free to merge this PR. I can rebase my fnRunner migration PR for set-gcpresources-ids and update the test infra there. |
4d993d9
to
b940a79
Compare
Using the golden test support in the functions SDK.
b940a79
to
2e9b530
Compare
if err := visitor(ref); err != nil { | ||
return err | ||
} | ||
ref, err := refInfo.buildFullyQualifiedRef(object, subObject) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the name "FullyQualified"!
if err != nil { | ||
return err | ||
} | ||
if err := visitor(ref); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super nit: seems to be more readable as "visit"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignore this comment. Didn't notice this is a common naming convention in go.
Using the golden test support in the functions SDK.