feat!: introduce structured runtime test config - #22
Open
rvolosatovs wants to merge 1 commit into
Open
Conversation
Member
Author
|
I'll undraft the PR once all downstream packages are adapted (and, hence, the design is validated) |
rvolosatovs
force-pushed
the
feat/runtime-config
branch
from
February 19, 2023 22:43
a50690d to
c13eb4d
Compare
rvolosatovs
added a commit
to rvolosatovs/capability-providers
that referenced
this pull request
Mar 1, 2023
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>
rvolosatovs
added a commit
to rvolosatovs/capability-providers
that referenced
this pull request
Mar 1, 2023
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>
rvolosatovs
added a commit
to rvolosatovs/capability-providers
that referenced
this pull request
Mar 1, 2023
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>
10 tasks
rvolosatovs
added a commit
to rvolosatovs/capability-providers
that referenced
this pull request
Mar 1, 2023
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>
10 tasks
rvolosatovs
force-pushed
the
feat/runtime-config
branch
2 times, most recently
from
March 1, 2023 15:37
58a246f to
de3e401
Compare
rvolosatovs
marked this pull request as ready for review
March 1, 2023 15:40
rvolosatovs
force-pushed
the
feat/runtime-config
branch
2 times, most recently
from
March 1, 2023 15:47
ad14018 to
bb101c2
Compare
brooksmtownsend
requested review from
autodidaddict,
brooksmtownsend and
stevelr
March 2, 2023 14:35
autodidaddict
approved these changes
Mar 2, 2023
- 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>
rvolosatovs
force-pushed
the
feat/runtime-config
branch
from
March 2, 2023 14:56
bb101c2 to
791ca91
Compare
stevelr
suggested changes
Mar 24, 2023
stevelr
left a comment
Contributor
There was a problem hiding this comment.
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, |
Contributor
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)