-
-
Notifications
You must be signed in to change notification settings - Fork 186
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
test: add runtime testing for Go models #1484
test: add runtime testing for Go models #1484
Conversation
✅ Deploy Preview for modelina ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
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.
Looks great @Devansh-Bhatt!
Just got those two comments, and then please use test:
as the PR title 🙂
Members: nil, | ||
ArrayType: nil, | ||
NestedObject: nil, | ||
AdditionalProperties: 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.
@Devansh-Bhatt if you look at one of the other runtime test, do you mind using the same values as in there? 🙂
"testing" | ||
) | ||
|
||
func TestShouldbeAbleToSerializeModel(t *testing.T) { |
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.
We still need to compare the actual serialized value with something we expect, you can grab the one in the other runtime test 🙂
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.
@jonaslagoni .. I tried to find the expected json in other runtime-tests but couldn't find one. The closest thing i found was under typescript-test where the serialized json was expected : {\"street_name\": \"test\",\"house_number\": 1,\"array_type\": [1,\"test\"],\"nestedObject\": {\"test\": \"test\"}}
and this was done for every field of the Address Struct.
Do you expect me to do the same as done in typescript ?
[As in java and other languages i did not find any expected json's] 🙂
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.
Yep, thats about it 👍
Pull Request Test Coverage Report for Build 5964862281
💛 - Coveralls |
SonarCloud Quality Gate failed. 0 Bugs No Coverage information Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
@jonaslagoni Is there any issue with the commit / changes that i made. I quite don't seem to understand what's the issue here 😕 |
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.
LGTM 👍
@all-contributors please add @Devansh-Bhatt for test, infra |
I've put up a pull request to add @Devansh-Bhatt! 🎉 |
🎉 This PR is included in version 1.9.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 2.0.0-next.25 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
test/runtime/runtime-go
test/runtime/runtime-go
package.json
test/runtime/runtime-go/target
which contained the auto generated models as a result of running the generation scripttest/runtime/runtime-go/Test_Go/Test_Address.go
package.json
.github/workflows/runtime-go-testing.yml
Related issue(s)
Resolves #1333