#[serial_test::serial]
#[tokio::test]
async fn test_list_200_success_all_params() {
let mut client = sideko_rest_api::SidekoClient::default()
.with_api_key_auth("API_KEY")
.with_cookie_auth("API_KEY")
.with_environment(sideko_rest_api::Environment::MockServer);
let res = client
.doc()
.deployment()
.list(sideko_rest_api::resources::doc::deployment::ListRequest {
doc_name: "my-project".to_string(),
limit: Some(123),
target: Some(sideko_rest_api::models::DeploymentTargetEnum::Preview),
})
.await;
println!("{res:?}");
assert!(res.is_ok());
}
#[serial_test::serial]
#[tokio::test]
async fn test_list_200_success_required_only() {
let mut client = sideko_rest_api::SidekoClient::default()
.with_api_key_auth("API_KEY")
.with_cookie_auth("API_KEY")
.with_environment(sideko_rest_api::Environment::MockServer);
let res = client
.doc()
.deployment()
.list(sideko_rest_api::resources::doc::deployment::ListRequest {
doc_name: "my-project".to_string(),
..Default::default()
})
.await;
println!("{res:?}");
assert!(res.is_ok());
}
#[serial_test::serial]
#[tokio::test]
async fn test_get_200_success_all_params() {
let mut client = sideko_rest_api::SidekoClient::default()
.with_api_key_auth("API_KEY")
.with_cookie_auth("API_KEY")
.with_environment(sideko_rest_api::Environment::MockServer);
let res = client
.doc()
.deployment()
.get(sideko_rest_api::resources::doc::deployment::GetRequest {
deployment_id: "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string(),
doc_name: "my-project".to_string(),
})
.await;
println!("{res:?}");
assert!(res.is_ok());
}
#[serial_test::serial]
#[tokio::test]
async fn test_trigger_201_success_all_params() {
let mut client = sideko_rest_api::SidekoClient::default()
.with_api_key_auth("API_KEY")
.with_cookie_auth("API_KEY")
.with_environment(sideko_rest_api::Environment::MockServer);
let res = client
.doc()
.deployment()
.trigger(sideko_rest_api::resources::doc::deployment::TriggerRequest {
doc_version_id: Some("3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string()),
target: sideko_rest_api::models::DeploymentTargetEnum::Preview,
doc_name: "my-project".to_string(),
})
.await;
println!("{res:?}");
assert!(res.is_ok());
}