Unverified Commit f97e6f3b authored by Zelda Hessler's avatar Zelda Hessler Committed by GitHub
Browse files

fix the `./gradlew :aws:sdk:assemble` command and aws-config tests on Windows (#3522)

tracked in issue #3518 

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent 27834ae2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -231,7 +231,9 @@ mod test {
    use time::OffsetDateTime;
    use tokio::time::timeout;

    // TODO(https://github.com/awslabs/aws-sdk-rust/issues/1117) This test is ignored on Windows because it uses Unix-style paths
    #[tokio::test]
    #[cfg_attr(windows, ignore)]
    async fn test_credential_process() {
        let provider = CredentialProcessProvider::new(String::from(
            r#"echo '{ "Version": 1, "AccessKeyId": "ASIARTESTID", "SecretAccessKey": "TESTSECRETKEY", "SessionToken": "TESTSESSIONTOKEN", "Expiration": "2022-05-02T18:36:00+00:00" }'"#,
@@ -252,7 +254,9 @@ mod test {
        );
    }

    // TODO(https://github.com/awslabs/aws-sdk-rust/issues/1117) This test is ignored on Windows because it uses Unix-style paths
    #[tokio::test]
    #[cfg_attr(windows, ignore)]
    async fn test_credential_process_no_expiry() {
        let provider = CredentialProcessProvider::new(String::from(
            r#"echo '{ "Version": 1, "AccessKeyId": "ASIARTESTID", "SecretAccessKey": "TESTSECRETKEY" }'"#,
+7 −3
Original line number Diff line number Diff line
@@ -299,17 +299,21 @@ mod test {
    make_test!(ecs_credentials_invalid_profile);

    make_test!(eks_pod_identity_credentials);
    // TODO(https://github.com/awslabs/aws-sdk-rust/issues/1117) This test is disabled on Windows because it uses Unix-style paths
    #[cfg(not(windows))]
    make_test!(eks_pod_identity_no_token_file);

    #[cfg(not(feature = "sso"))]
    make_test!(sso_assume_role #[should_panic(expected = "This behavior requires following cargo feature(s) enabled: sso")]);
    #[cfg(not(feature = "sso"))]
    make_test!(sso_no_token_file #[should_panic(expected = "This behavior requires following cargo feature(s) enabled: sso")]);

    #[cfg(feature = "sso")]
    make_test!(sso_assume_role);

    #[cfg(feature = "sso")]
    // TODO(https://github.com/awslabs/aws-sdk-rust/issues/1117) This test is disabled on Windows because it uses Unix-style paths
    #[cfg(not(any(feature = "sso", windows)))]
    make_test!(sso_no_token_file #[should_panic(expected = "This behavior requires following cargo feature(s) enabled: sso")]);
    // TODO(https://github.com/awslabs/aws-sdk-rust/issues/1117) This test is disabled on Windows because it uses Unix-style paths
    #[cfg(all(feature = "sso", not(windows)))]
    make_test!(sso_no_token_file);

    #[cfg(feature = "credentials-sso")]
+2 −0
Original line number Diff line number Diff line
@@ -982,6 +982,8 @@ pub(crate) mod test {
        http_client.assert_requests_match(&[]);
    }

    // TODO(https://github.com/awslabs/aws-sdk-rust/issues/1117) This test is ignored on Windows because it uses Unix-style paths
    #[cfg_attr(windows, ignore)]
    /// Verify that the end-to-end real client has a 1-second connect timeout
    #[tokio::test]
    #[cfg(feature = "rustls")]
+2 −0
Original line number Diff line number Diff line
@@ -454,6 +454,8 @@ mod test {
        );
    }

    // TODO(https://github.com/awslabs/aws-sdk-rust/issues/1117) This test is ignored on Windows because it uses Unix-style paths
    #[cfg_attr(windows, ignore)]
    #[tokio::test]
    #[cfg(feature = "rustls")]
    async fn external_timeout_during_credentials_refresh_should_yield_last_retrieved_credentials() {
+6 −2
Original line number Diff line number Diff line
@@ -594,9 +594,11 @@ mod test {
    make_test!(retry_on_error);
    make_test!(invalid_config);
    make_test!(region_override);
    #[cfg(feature = "credentials-process")]
    // TODO(https://github.com/awslabs/aws-sdk-rust/issues/1117) This test is disabled on Windows because it uses Unix-style paths
    #[cfg(all(feature = "credentials-process", not(windows)))]
    make_test!(credential_process);
    #[cfg(feature = "credentials-process")]
    // TODO(https://github.com/awslabs/aws-sdk-rust/issues/1117) This test is disabled on Windows because it uses Unix-style paths
    #[cfg(all(feature = "credentials-process", not(windows)))]
    make_test!(credential_process_failure);
    #[cfg(feature = "credentials-process")]
    make_test!(credential_process_invalid);
@@ -622,6 +624,8 @@ mod sso_tests {
    use aws_types::os_shim_internal::{Env, Fs};
    use std::collections::HashMap;

    // TODO(https://github.com/awslabs/aws-sdk-rust/issues/1117) This test is ignored on Windows because it uses Unix-style paths
    #[cfg_attr(windows, ignore)]
    // In order to preserve the SSO token cache, the inner provider must only
    // be created once, rather than once per credential resolution.
    #[tokio::test]
Loading