-
Notifications
You must be signed in to change notification settings - Fork 35
YAML config parsing issue #307
Copy link
Copy link
Open
Description
YAML examples aren't parsed properly and no tests are picked up.
Steps to reproduce:
$ cd plugins/samples/add_request_header/
$ go mod init go-plugin
$ go mod tidy
$ mkdir -p build && env GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o build/plugin.wasm plugin.go
$ docker run -it -v $(pwd):/mnt us-docker.pkg.dev/service-extensions-samples/plugins/wasm-tester:main --yaml /mnt/tests.yaml --plugin /mnt/build/plugin.wasm
[==========] Running 0 tests from 0 test suites.
[==========] 0 tests from 0 test suites ran. (0 ms total)
[ PASSED ] 0 tests.
There seems to be some differences between the expected keys and keys in the example such as test vs tests, result.has_header list vs map expectation.
The proto tests are working as expected.
docker run -it -v $(pwd):/mnt us-docker.pkg.dev/service-extensions-samples/plugins/wasm-tester:main --proto /mnt/tests.textpb --plugin /mnt/build/plugin.wasm
[==========] Running 4 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 4 tests from Test_v8
[ RUN ] Test_v8.AddsRequestHeader
[ OK ] Test_v8.AddsRequestHeader (134 ms)
[ RUN ] Test_v8.UpdatesRequestHeader
[ OK ] Test_v8.UpdatesRequestHeader (125 ms)
[ RUN ] Test_v8.RequestAndResponse
[ OK ] Test_v8.RequestAndResponse (122 ms)
[ RUN ] Test_v8.CaseInsensitiveUpdates
[ OK ] Test_v8.CaseInsensitiveUpdates (115 ms)
[----------] 4 tests from Test_v8 (497 ms total)
[----------] Global test environment tear-down
[==========] 4 tests from 1 test suite ran. (497 ms total)
[ PASSED ] 4 tests.
[sic]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels