Skip to content

Conversation

@vincenttran-msft
Copy link
Member

@vincenttran-msft vincenttran-msft commented Nov 7, 2025

.tsp: Azure/azure-rest-api-specs#38633

  • Adds implementations for set_access_policy() and get_access_policy()
  • Adds a helper function from HashMap<String, AccessPolicy> -> SignedIdentifiers

@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Nov 7, 2025
@vincenttran-msft vincenttran-msft changed the title [Storage] sgap [Storage] set/get_access_policy for ContainerClient Nov 7, 2025
response_access_policy.clone().unwrap().permission,
access_policy.permission
);
assert_eq!(response_access_policy.clone().unwrap().expiry, expiry);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log
Relevant log excerpt:

2025-11-07T02:41:40.3347517Z ---- test_container_access_policy stdout ----
2025-11-07T02:41:40.3347746Z
2025-11-07T02:41:40.3348185Z thread 'test_container_access_policy' (20747) panicked at sdk/storage/azure_storage_blob/tests/blob_container_client.rs:449:5:
2025-11-07T02:41:40.3348696Z assertion left == right failed
2025-11-07T02:41:40.3349477Z left: Some("2025-11-07T02:09:40.3229246Z")
2025-11-07T02:41:40.3353978Z right: Some("2025-11-07T02:41:35.2937819Z")

@heaths We are running into an issue when asserting against dynamically generated datetime objects, as here the LHS is from the recording: <Expiry>2025-11-07T02:09:40.3229246Z</Expiry>
while the RHS is from the actual test execution.

In Python, this is resolved through using a get_datetime_variable function:
expiry_time = self.get_datetime_variable(variables, 'expiry_time', datetime.utcnow() + timedelta(hours=1))
And this way the datetimes are present in variables:

"Variables": {
"expiry_time": "2022-08-09T19:54:43.709865",

Is this something that can be done in Rust currently, or is this a net new feature for Rust's test infrastructure? I see that we have var() and var_opt() but both of these are for getting and not setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant