mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-11-14 13:06:05 +02:00
Run the Bitwarden SDK's live end-to-end tests against Vaultwarden (#7953)
* Add a test seeder behind the unsafe_test_mode feature For the end-to-end tests: with the feature, /test/seeder answers the calls the SDK's live tests make to a seeder API (POST /seed with SingleUserScene or TestVectorUserScene, DELETE /seed/<playId>), behind HTTP basic auth from TEST_SEEDER_USERNAME and TEST_SEEDER_PASSWORD, and 404 without them. It creates accounts without any checks, so no release build has the feature. CI builds and tests it with sqlite. * Run the SDK live tests against the test seeder tools/sdk-live-tests/run.sh builds the server with unsafe_test_mode and runs the live tests of the SDK's e2e/wasm suite. For SDK versions whose tests log in to one given account, each user test vector with a master password is seeded with its vault on a fresh server; for versions that seed their own accounts, the tests get the seeder's address. Every vector runs, then a summary. The workflow runs it by hand, and on changes to the seeder or the runner. * Run the SDK live tests daily * Test the published SDK package by default in the SDK live tests
This commit is contained in:
1 parent
730048e3c6
commit
d2d1294098
12 files changed
+997
-1
No files matched your search
+11
-1
@@ -577,9 +577,19 @@ async fn launch_rocket(pool: db::DbPool, extra_debug: bool) -> Result<(), Error>
|
||||
.limit("data-form", 525.megabytes()) // This needs to match the maximum allowed file size for Send
|
||||
.limit("file", 525.megabytes()); // This needs to match the maximum allowed file size for attachments
|
||||
|
||||
let rocket = rocket::custom(config);
|
||||
#[cfg(feature = "unsafe_test_mode")]
|
||||
let rocket = {
|
||||
warn!(
|
||||
"This build has `unsafe_test_mode`: its test seeder at /test/seeder creates accounts without any checks. \
|
||||
Never use it outside of tests!"
|
||||
);
|
||||
rocket.mount([basepath, "/test/seeder"].concat(), api::test_seeder_routes())
|
||||
};
|
||||
|
||||
// If adding more paths here, consider also adding them to
|
||||
// crate::utils::LOGGED_ROUTES to make sure they appear in the log
|
||||
let instance = rocket::custom(config)
|
||||
let instance = rocket
|
||||
.mount([basepath, "/"].concat(), api::web_routes())
|
||||
.mount([basepath, "/api"].concat(), api::core_routes())
|
||||
.mount([basepath, "/admin"].concat(), api::admin_routes())
|
||||
|
||||
Reference in new issue
Block a user