Fix possible nil-pointer error; add golden test for set-name-prefix#926
Fix possible nil-pointer error; add golden test for set-name-prefix#926justinsb wants to merge 1 commit intokptdev:mainfrom
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.
I like the name "FullyQualified"!
| if err != nil { | ||
| return err | ||
| } | ||
| if err := visitor(ref); err != nil { |
There was a problem hiding this comment.
super nit: seems to be more readable as "visit"?
There was a problem hiding this comment.
ignore this comment. Didn't notice this is a common naming convention in go.
Using the golden test support in the functions SDK.