Skip to content
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

refactor(wash-cli): move more wash invocations into TestWashInstance #1050

Conversation

vados-cosmonic
Copy link
Contributor

@vados-cosmonic vados-cosmonic commented Nov 20, 2023

Feature or Problem

TestWashInstance is a test utility struct that encapsulates (and tracks) child processes spawned by wash so that they can be cleaned up upon drop(), and information about spawned hosts can be retrieved.

Some invocations of wash itself (normally from tests that ensure functionality works have been moved into TestWashInstance to make them easier to call -- with the current built version of wash (i.e. the cargo-provided ENV variable CARGO_BIN_EXE_wash).

This commit adds more invocations (wash start provider, wash stop actor, wash stop host) into the TestWashInstance struct used from tests, shortening the code required for individual tests.

Related Issues

Release Information

Consumer Impact

Testing

Unit Test(s)

Acceptance or Integration

All integration tests should be using the new code (and still passing)

Manual Verification

Verified manually

@vados-cosmonic vados-cosmonic requested review from a team as code owners November 20, 2023 17:56
@vados-cosmonic vados-cosmonic force-pushed the feat/test/add-stop-methods-to-test-wash-instance branch from 7a83959 to 29b85f0 Compare November 21, 2023 14:31
@vados-cosmonic vados-cosmonic deleted the feat/test/add-stop-methods-to-test-wash-instance branch November 21, 2023 14:33
@vados-cosmonic vados-cosmonic restored the feat/test/add-stop-methods-to-test-wash-instance branch November 21, 2023 14:33
`TestWashInstance` is a test utility struct that encapsulates (and tracks) child
processes spawned by `wash` so that they can be cleaned up upon `drop()`,
and information about spawned hosts can be retrieved.

Some invocations of `wash` itself (normally from tests that ensure
functionality works have been moved into `TestWashInstance` to make
them easier to call -- with the *current* built version of
`wash` (i.e. the cargo-provided ENV variable `CARGO_BIN_EXE_wash`).

This commit adds more invocations (`wash start provider`, `wash stop
actor`, `wash stop host`) into the `TestWashInstance` struct used from
tests, shortening the code required for individual tests.

Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
@vados-cosmonic vados-cosmonic force-pushed the feat/test/add-stop-methods-to-test-wash-instance branch from 8244da0 to b0d8277 Compare November 21, 2023 14:39
@vados-cosmonic vados-cosmonic enabled auto-merge (rebase) November 21, 2023 14:39
@vados-cosmonic vados-cosmonic merged commit 85193dd into wasmCloud:main Nov 21, 2023
34 checks passed
@vados-cosmonic vados-cosmonic deleted the feat/test/add-stop-methods-to-test-wash-instance branch December 26, 2023 10:16
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.

None yet

3 participants