-
Notifications
You must be signed in to change notification settings - Fork 5
feat!: introduce structured runtime test config #22
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
base: main
Are you sure you want to change the base?
Conversation
|
I'll undraft the PR once all downstream packages are adapted (and, hence, the design is validated) |
a50690d to
c13eb4d
Compare
Add symlinks to workspace `target` until wasmCloud/wasmcloud-test#22 is merged and integrated into this repository removing the need for on-disk test configuration Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Add symlinks to workspace `target` until wasmCloud/wasmcloud-test#22 is merged and integrated into this repository removing the need for on-disk test configuration Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Add symlinks to workspace `target` until wasmCloud/wasmcloud-test#22 is merged and integrated into this repository removing the need for on-disk test configuration Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Add symlinks to workspace `target` until wasmCloud/wasmcloud-test#22 is merged and integrated into this repository removing the need for on-disk test configuration Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
58a246f to
de3e401
Compare
ad14018 to
bb101c2
Compare
- Replace the usage of free-form `TomlMap` by a structured, typed `Config` struct - Remove `bin_path` from config - Require passing of `Config` and `path` to `test_provider` at runtime Breaking changes: - `load_config` is replaced by `Config::load` method - `test_provider` requires `path` and `Config` as arguments - `rust_backtrace` config field is renamed to `backtrace` and its type is changed from string to a boolean Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
bb101c2 to
791ca91
Compare
stevelr
left a comment
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 really like this - good improvement. Please make sure to rebase to main to address any merge conflicts. Also bump the version in Cargo.toml to 0.8.0.
| /// URL at which NATS is accessible | ||
| pub nats_url: String, | ||
| /// URL at which Redis is accessible | ||
| pub redis_url: String, |
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.
Althoughredis_url was in the sample config (commented out), I don't think it should be part of the Config struct since most tests won't need it. If a test does need it, it fits better into the values map.
nats_url should be here because nearly ever test does need that
Feature or Problem
TomlMapby a structured, typedConfigstructbin_pathfrom configConfigandpathtotest_providerat runtimeRelated Issues
Closes #6
Release Information
Consumer Impact
Breaking changes:
load_configis replaced byConfig::loadmethodtest_providerrequirespathandConfigas argumentsrust_backtraceconfig field is renamed tobacktraceand its type is changed from string to a booleanThis is a breaking API change, downstream packages will have to be updated, e.g. for https://github.com/wasmCloud/capability-providers
httpserverprovider:Testing
Tested on platform(s)
Platforms
Built on platform(s)
Unit Test(s)
Acceptance or Integration
Manual Verification
wasmCloud/capability-providers#219 (wasmCloud/capability-providers@78fab3e in particular)