test: add test cases for serve#15
Conversation
| .get(PATH_INFO_HEADER) | ||
| .expect("PATH_INFO header must be set by the Spin runtime") | ||
| .to_str()?; | ||
| println!("path: {}", path); |
There was a problem hiding this comment.
Removed it. Thank you.
|
Hi reviewers, this is my first time writing test cases for a wasm target. Thanks for your review and guidance. I have two questions.
|
|
Thanks for the PR! It doesn't look like these tests really depend on being run in a Wasm environment; I tested locally by replacing |
|
I don't see anything obvious in the cargo docs to simplify it, but for the purposes of this PR I think we can use this slightly awkward command in the Makefile: |
Yeah, this is a good idea. I just saw that cargo merged multiple targets a few days ago. Probably, we can also try it? |
Signed-off-by: Frank Yang <yangpoan@gmail.com>
|
Hi @lann, I update test cases and add CI. Please help me review when you have time. Thank you. |
| @@ -0,0 +1,52 @@ | |||
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |||
There was a problem hiding this comment.
This can be simplified a lot for this repo - much of what we want to test for spin doesn't apply here. If you'd like to drop this from your PR I can add something simple in a followup.
There was a problem hiding this comment.
Removed it. Thank you.
There was a problem hiding this comment.
Forgive me if I'm misreading, but it looks like you dropped this line and kept the rest of the file. If we keep the file (which is what I think @lann was questioning), then we should keep this line. The reason is that this declaration avoids squigglies when editing the workflow in VS Code if you have the YAML extension installed. The YAML language server seems to recognise certain filenames and infer a schema, and for build.yaml it infers something other than GH workflow and complains about the 'wrong' entries.
Again, if I've misunderstood then please ignore me!
|
Thanks for the PR! |
resolves #1 #2