You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of #1738, I added a test to linera-rpc that connects to a running Linera proxy and gets its version. This test can be successfully run both natively and in the browser with wasm-pack test, but currently requires hard-coding the server port, meaning it cannot be run normally/directly with cargo test or wasm-pack test — linera net up must first be run to start the server on port 9000.
We find ourselves generally in need of a way of handling fixtures in tests for several use cases:
table names must be unique in the DynamoDB and ScyllaDB storage tests: we are currently using a random number generator to (hopefully) make them unique, but this makes the tests non-deterministic and unable to run on bare Wasm
the storage backend could be shared between tests (using the storage service), but passing the storage service into tests is difficult without hard-coding its address
the local linera-service tests currently bring up a new Linera net for each test using test_case to list descriptions of net configurations
rstest supports fixtures, and can be used for some of this, but has two drawbacks that add friction for our use cases:
while it supports #[once] fixtures that are held across the whole suite, the destructors for those fixtures are never called, meaning that we can't bring down the fixture (e.g. net) after testing ready for the next test suite
it doesn't provide a way for the fixtures to run on the host, which is necessary when cross-testing (e.g. for Wasm)
The text was updated successfully, but these errors were encountered:
As part of #1738, I added a test to
linera-rpc
that connects to a running Linera proxy and gets its version. This test can be successfully run both natively and in the browser withwasm-pack test
, but currently requires hard-coding the server port, meaning it cannot be run normally/directly withcargo test
orwasm-pack test
—linera net up
must first be run to start the server on port 9000.We find ourselves generally in need of a way of handling fixtures in tests for several use cases:
linera-service
tests currently bring up a new Linera net for each test usingtest_case
to list descriptions of net configurationsrstest
supports fixtures, and can be used for some of this, but has two drawbacks that add friction for our use cases:#[once]
fixtures that are held across the whole suite, the destructors for those fixtures are never called, meaning that we can't bring down the fixture (e.g. net) after testing ready for the next test suiteThe text was updated successfully, but these errors were encountered: