Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tests/request_options_and_errors_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ use wiremock::matchers::{header, header_exists, method, path};
use wiremock::{Mock, MockServer, ResponseTemplate};
use workos::{Error, RequestOptions};

// `OrganizationInput::domains` is deprecated in the spec, but struct literals
// must name every field, so tests constructing the input allow the lint.
#[allow(deprecated)]
#[tokio::test]
async fn idempotency_key_is_sent_as_header() {
let server = MockServer::start().await;
Expand Down
5 changes: 5 additions & 0 deletions tests/retry_safety_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ async fn get_retries_on_5xx_up_to_max_retries() {
assert_eq!(transport.calls(), 3);
}

// `OrganizationInput::domains` is deprecated in the spec, but struct literals
// must name every field, so tests constructing the input allow the lint.
#[allow(deprecated)]
#[tokio::test]
async fn post_does_not_retry_without_idempotency_key() {
let transport = Arc::new(CountingTransport::new(503));
Expand All @@ -104,6 +107,7 @@ async fn post_does_not_retry_without_idempotency_key() {
assert_eq!(transport.calls(), 1);
}

#[allow(deprecated)]
#[tokio::test]
async fn post_retries_with_idempotency_key() {
let transport = Arc::new(CountingTransport::new(503));
Expand Down Expand Up @@ -156,6 +160,7 @@ async fn retry_after_header_is_honored() {
assert_eq!(transport.calls(), 3);
}

#[allow(deprecated)]
#[tokio::test]
async fn idempotent_strategy_overrides_explicit_key() {
let transport = Arc::new(CountingTransport::new(503));
Expand Down
Loading