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
Currently, we gate a number of things in the code, including what it actually builds on debug_assertions (~= --release). This has served us well so far, but it can be pretty confusing. Instead, I think what I want is as follows:
cargo run and cargo run --release should do the same thing
That thing should be to run in non-Lambda mode.
Lambda mode should be enabled using --as-lambda (or a lambda subcommand; either is fine).
Should respect USE_DYNAMO.
I think there's an argument for not including local support when building --release?
If so, fail if USE_DYNAMO isn't set with --release.
Note that prod deployment configuration will need updating!
cargo test and cargo test --release should do the same thing
That thing should be to run tests against Backend::local
The same tests with Backend::dynamo should be ignored.
So #218 suggest the lambda vs normal runtime splitting, where the core logic goes to the library and then we got a default bin and a lambda-runtime one.
This PR with end-to-end tests setup relies on the app's logic being in the lib. It utilizes fantoccini and also include the first end-to-end test covering the following "host" story:
app user (host) can see the welcome page;
app user (host) can start an event and they are given a URL with an event + secret;
clicking the "share" button copies the URL without the secret;
there are initially no questions related to the event;
I will move the mentioned PR to this repository once we handle #218.
jfyi: the Belarusian puppet show is called Batlejka
Currently, we gate a number of things in the code, including what it actually builds on
debug_assertions
(~=--release
). This has served us well so far, but it can be pretty confusing. Instead, I think what I want is as follows:cargo run
andcargo run --release
should do the same thing--as-lambda
(or alambda
subcommand; either is fine).USE_DYNAMO
.--release
?USE_DYNAMO
isn't set with--release
.cargo test
andcargo test --release
should do the same thingBackend::local
Backend::dynamo
should be ignored.USE_DYNAMO
un-ignores them (hard w/o Add ability to ignore tests at runtime. rust-lang/rust#68007).{local, dynamo}::testname
rather thantestname::{local, dynamo}
.ask
tests inmod ask
).cargo run --as-lambda
(probably usingOnceLock
to share b/w tests).main
logic from the binary here.cargo test
, but invoking the API directly.USE_DYNAMO
.--as-lambda
.Backend
that just usesreqwest
.tests/e2e.rs
, which:npm run dev
(ornpm run build
+ hosts viaaxum
or something).cargo run --as-lambda
withUSE_DYNAMO=local
.--as-lambda
.USE_DYNAMO
.The text was updated successfully, but these errors were encountered: