-
Notifications
You must be signed in to change notification settings - Fork 11
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
tests: add standalone tests module for testing generated Go code #166
base: main
Are you sure you want to change the base?
Conversation
This requires TinyGo >= 0.33.1 to pass, which is not yet available. |
4d110bc
to
27cbe64
Compare
@@ -0,0 +1,4 @@ | |||
{ | |||
"inherits": ["wasip2"], | |||
"emulator": "wasmtime --wasm component-model -Sinherit-network -Sallow-ip-name-lookup --dir={tmpDir}::/tmp {}" |
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.
For runtime tests that don't require networking, can we customize this JSON to suit specific test cases?
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 submitted a PR to TinyGo to make this unnecessary.
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.
e289e39
to
0c9fe68
Compare
5ab6d81
to
79689b4
Compare
Implement a lightweight pattern for testing generated Go code using TinyGo +
wasip2
. In addition, thetestdata
directory now has an emptygo.mod
file to exclude it from module distribution.make generate
from the root directory.cd tests && tinygo test -v -target=./wasip2.json ./...