fix(sdk): fix builder pattern to actually work with default values

In previous versions the builder pattern required all values to be set.
This has not been fixed, so that default values are allowed.
This commit is contained in:
2023-02-25 01:03:24 +01:00
committed by Kasper Juul Hermansen
parent 6a9a560cdc
commit ecca036bc6
4 changed files with 55 additions and 90 deletions

View File

@@ -25,28 +25,3 @@ impl Engine {
self.from_cli(cfg).await
}
}
#[cfg(test)]
mod tests {
use crate::{config::Config, connect_params::ConnectParams};
use super::Engine;
// TODO: these tests potentially have a race condition
#[tokio::test]
async fn engine_can_start() {
let engine = Engine::new();
let params = engine
.start(&Config::new(None, None, None, None))
.await
.unwrap();
assert_ne!(
params.0,
ConnectParams {
port: 123,
session_token: "123".into()
}
)
}
}

View File

@@ -12,13 +12,3 @@ pub async fn get_schema() -> eyre::Result<IntrospectionResponse> {
Ok(schema)
}
#[cfg(test)]
mod tests {
use super::get_schema;
#[tokio::test]
async fn can_get_schema() {
let _ = get_schema().await.unwrap();
}
}