Skip to content

Env tests and fixes#81

Merged
nerfZael merged 12 commits into
mainfrom
nerfzael-env-tests-and-fixes
May 11, 2023
Merged

Env tests and fixes#81
nerfZael merged 12 commits into
mainfrom
nerfzael-env-tests-and-fixes

Conversation

@nerfZael
Copy link
Copy Markdown
Contributor

@nerfZael nerfZael commented May 4, 2023

Closes: #52

  • Fixed an issue where a wrapper's env would override the subinvoked wrapper's env

  • Fixed an issue with optional env
    It wasn't working because we were encoding an empty object which displayed an encoded size > 0, so deserialization would fail.

  • Implemented a comprehensive test suite for the env feature

  • This PR uses test wrappers from the following PR in the wasm test harness: Env cases refactor wrap-test-harness#64

Test cases:

  • invoke method without env does not require env
  • invoke method without env works with env
  • invoke method with required env works with env
  • invoke method with required env throws without env registered
  • invoke method with optional env works with env
  • invoke method with optional env works without env
  • env can be registered for any uri in resolution path (this one is commented out with a TODO note and depends on an the following issue: Env not fetched when using redirected URI #79)
  • subinvoke method without env does not require env
  • subinvoke method without env works with env
  • subinvoke method with required env works with env
  • subinvoke method with required env throws without env registered
  • subinvoke method with optional env works with env
  • subinvoke method with optional env works without env
  • subinvoker env does not override subinvoked env

@nerfZael nerfZael requested review from cbrzn and namesty May 9, 2023 18:08
@nerfZael nerfZael marked this pull request as ready for review May 9, 2023 18:08
@nerfZael nerfZael merged commit f2e79d4 into main May 11, 2023
@cbrzn cbrzn deleted the nerfzael-env-tests-and-fixes branch May 31, 2023 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Env not being properly passed through subinvocations

3 participants