mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2025-07-25 19:09:22 +02:00
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:
@@ -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()
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user