From d7a3eea7c886e9a889af1fd2d5c5c4026e1c11fd Mon Sep 17 00:00:00 2001 From: Zelda Hessler Date: Tue, 23 Nov 2021 14:23:31 -0600 Subject: [PATCH] integration tests cleanup (#880) * add: test-util feature to s3 integration test Cargo.toml * add: test-util feature to integration tests missing it remove: vestigial src/lib.rs files sort: integration test deps * fix: copy-paste error in Cargo.toml * fix: copy-paste error in Cargo.toml * verify: integration tests run without lib files fix: outdated dependency path name remove: extra space in Cargo.toml * update: Credential creation method in integration test --- aws/sdk/integration-tests/glacier/Cargo.toml | 14 ++++++-------- aws/sdk/integration-tests/glacier/src/lib.rs | 4 ---- aws/sdk/integration-tests/iam/Cargo.toml | 14 ++++++-------- aws/sdk/integration-tests/iam/src/lib.rs | 4 ---- aws/sdk/integration-tests/kms/Cargo.toml | 4 ++-- aws/sdk/integration-tests/kms/src/lib.rs | 4 ---- aws/sdk/integration-tests/lambda/Cargo.toml | 10 +++++----- aws/sdk/integration-tests/polly/Cargo.toml | 14 ++++++-------- aws/sdk/integration-tests/qldbsession/Cargo.toml | 2 +- aws/sdk/integration-tests/qldbsession/src/lib.rs | 4 ---- aws/sdk/integration-tests/s3/Cargo.toml | 14 ++++++-------- aws/sdk/integration-tests/s3control/Cargo.toml | 14 ++++++-------- .../s3control/tests/signing-it.rs | 9 ++++----- aws/sdk/integration-tests/sts/Cargo.toml | 8 +++----- .../transcribestreaming/Cargo.toml | 4 ++-- 15 files changed, 47 insertions(+), 76 deletions(-) delete mode 100644 aws/sdk/integration-tests/glacier/src/lib.rs delete mode 100644 aws/sdk/integration-tests/iam/src/lib.rs delete mode 100644 aws/sdk/integration-tests/kms/src/lib.rs delete mode 100644 aws/sdk/integration-tests/qldbsession/src/lib.rs diff --git a/aws/sdk/integration-tests/glacier/Cargo.toml b/aws/sdk/integration-tests/glacier/Cargo.toml index 359a81397..f50282ef8 100644 --- a/aws/sdk/integration-tests/glacier/Cargo.toml +++ b/aws/sdk/integration-tests/glacier/Cargo.toml @@ -7,15 +7,13 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] +[dev-dependencies] +aws-http = { path = "../../build/aws-sdk/sdk/aws-http"} +aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper"} aws-sdk-glacier = { path = "../../build/aws-sdk/sdk/glacier" } aws-smithy-client = { path = "../../build/aws-sdk/sdk/aws-smithy-client", features = ["test-util"] } aws-smithy-protocol-test = { path = "../../build/aws-sdk/sdk/aws-smithy-protocol-test"} -tracing-subscriber = "0.2.18" - -[dev-dependencies] -tokio = { version = "1", features = ["full"]} -http = "0.2.3" bytes = "1" -aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper"} -aws-http = { path = "../../build/aws-sdk/sdk/aws-http"} +http = "0.2.3" +tokio = { version = "1", features = ["full", "test-util"]} +tracing-subscriber = "0.2.18" diff --git a/aws/sdk/integration-tests/glacier/src/lib.rs b/aws/sdk/integration-tests/glacier/src/lib.rs deleted file mode 100644 index c6d888f02..000000000 --- a/aws/sdk/integration-tests/glacier/src/lib.rs +++ /dev/null @@ -1,4 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0. - */ diff --git a/aws/sdk/integration-tests/iam/Cargo.toml b/aws/sdk/integration-tests/iam/Cargo.toml index c762c41f5..14256a3d4 100644 --- a/aws/sdk/integration-tests/iam/Cargo.toml +++ b/aws/sdk/integration-tests/iam/Cargo.toml @@ -7,16 +7,14 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] +[dev-dependencies] aws-endpoint = { path = "../../build/aws-sdk/sdk/aws-endpoint" } +aws-http = { path = "../../build/aws-sdk/sdk/aws-http"} +aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper"} aws-sdk-iam = { path = "../../build/aws-sdk/sdk/iam" } aws-smithy-client = { path = "../../build/aws-sdk/sdk/aws-smithy-client", features = ["test-util"] } aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } -tracing-subscriber = "0.2.18" - -[dev-dependencies] -tokio = { version = "1", features = ["full"]} -http = "0.2.3" bytes = "1" -aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper"} -aws-http = { path = "../../build/aws-sdk/sdk/aws-http"} +http = "0.2.3" +tokio = { version = "1", features = ["full", "test-util"]} +tracing-subscriber = "0.2.18" diff --git a/aws/sdk/integration-tests/iam/src/lib.rs b/aws/sdk/integration-tests/iam/src/lib.rs deleted file mode 100644 index c6d888f02..000000000 --- a/aws/sdk/integration-tests/iam/src/lib.rs +++ /dev/null @@ -1,4 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0. - */ diff --git a/aws/sdk/integration-tests/kms/Cargo.toml b/aws/sdk/integration-tests/kms/Cargo.toml index ec56c336e..2a29d5217 100644 --- a/aws/sdk/integration-tests/kms/Cargo.toml +++ b/aws/sdk/integration-tests/kms/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] +[dev-dependencies] aws-http = { path = "../../build/aws-sdk/sdk/aws-http" } aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper" } aws-sdk-kms = { path = "../../build/aws-sdk/sdk/kms" } @@ -16,5 +16,5 @@ aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } aws-smithy-types = { path = "../../build/aws-sdk/sdk/aws-smithy-types" } bytes = "1" http = "0.2.3" -tokio = { version = "1", features = ["full"]} +tokio = { version = "1", features = ["full", "test-util"]} tracing-subscriber = "0.2.16" diff --git a/aws/sdk/integration-tests/kms/src/lib.rs b/aws/sdk/integration-tests/kms/src/lib.rs deleted file mode 100644 index c6d888f02..000000000 --- a/aws/sdk/integration-tests/kms/src/lib.rs +++ /dev/null @@ -1,4 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0. - */ diff --git a/aws/sdk/integration-tests/lambda/Cargo.toml b/aws/sdk/integration-tests/lambda/Cargo.toml index 47d271ea3..f1c10ce00 100644 --- a/aws/sdk/integration-tests/lambda/Cargo.toml +++ b/aws/sdk/integration-tests/lambda/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["AWS Rust SDK Team ", "Zelda Hessler "] edition = "2018" -[dependencies] +[dev-dependencies] async-stream = "0.3" aws-http = { path = "../../build/aws-sdk/sdk/aws-http"} aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper"} @@ -14,8 +14,8 @@ bytes = "1" futures-core = "0.3" http = "0.2.3" serde_json = "1" -smithy-client = { path = "../../build/aws-sdk/sdk/smithy-client", features = ["test-util"] } -smithy-eventstream = { path = "../../build/aws-sdk/sdk/smithy-eventstream" } -smithy-http = { path = "../../build/aws-sdk/sdk/smithy-http" } -tokio = { version = "1", features = ["full"]} +aws-smithy-client = { path = "../../build/aws-sdk/sdk/aws-smithy-client", features = ["test-util"] } +aws-smithy-eventstream = { path = "../../build/aws-sdk/sdk/aws-smithy-eventstream" } +aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } +tokio = { version = "1", features = ["full", "test-util"]} tracing-subscriber = "0.2.18" diff --git a/aws/sdk/integration-tests/polly/Cargo.toml b/aws/sdk/integration-tests/polly/Cargo.toml index 787c186f1..64b144335 100644 --- a/aws/sdk/integration-tests/polly/Cargo.toml +++ b/aws/sdk/integration-tests/polly/Cargo.toml @@ -7,15 +7,13 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] +[dev-dependencies] +aws-http = { path = "../../build/aws-sdk/sdk/aws-http"} +aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper"} aws-sdk-polly = { path = "../../build/aws-sdk/sdk/polly" } aws-smithy-client = { path = "../../build/aws-sdk/sdk/aws-smithy-client", features = ["test-util"] } aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } -tracing-subscriber = "0.2.18" - -[dev-dependencies] -tokio = { version = "1", features = ["full"]} -http = "0.2.3" bytes = "1" -aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper"} -aws-http = { path = "../../build/aws-sdk/sdk/aws-http"} +http = "0.2.3" +tokio = { version = "1", features = ["full"]} +tracing-subscriber = "0.2.18" diff --git a/aws/sdk/integration-tests/qldbsession/Cargo.toml b/aws/sdk/integration-tests/qldbsession/Cargo.toml index 5a875a549..5fd39647c 100644 --- a/aws/sdk/integration-tests/qldbsession/Cargo.toml +++ b/aws/sdk/integration-tests/qldbsession/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] +[dev-dependencies] aws-http = { path = "../../build/aws-sdk/sdk/aws-http" } aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper" } aws-sdk-qldbsession = { path = "../../build/aws-sdk/sdk/qldbsession" } diff --git a/aws/sdk/integration-tests/qldbsession/src/lib.rs b/aws/sdk/integration-tests/qldbsession/src/lib.rs deleted file mode 100644 index c6d888f02..000000000 --- a/aws/sdk/integration-tests/qldbsession/src/lib.rs +++ /dev/null @@ -1,4 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0. - */ diff --git a/aws/sdk/integration-tests/s3/Cargo.toml b/aws/sdk/integration-tests/s3/Cargo.toml index 7e95ebbdc..73c99df8a 100644 --- a/aws/sdk/integration-tests/s3/Cargo.toml +++ b/aws/sdk/integration-tests/s3/Cargo.toml @@ -7,18 +7,16 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] +[dev-dependencies] +aws-http = { path = "../../build/aws-sdk/sdk/aws-http"} +aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper"} aws-sdk-s3 = { path = "../../build/aws-sdk/sdk/s3" } +aws-smithy-async = { path = "../../build/aws-sdk/sdk/aws-smithy-async" } aws-smithy-client = { path = "../../build/aws-sdk/sdk/aws-smithy-client", features = ["test-util"] } aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } -aws-smithy-async = { path = "../../build/aws-sdk/sdk/aws-smithy-async" } aws-smithy-types = { path = "../../build/aws-sdk/sdk/aws-smithy-types" } -tracing-subscriber = "0.2.18" -tokio = { version = "1", features = ["full", "test-util"]} - -[dev-dependencies] -aws-http = { path = "../../build/aws-sdk/sdk/aws-http"} -aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper"} bytes = "1" http = "0.2.3" serde_json = "1" +tokio = { version = "1", features = ["full", "test-util"]} +tracing-subscriber = "0.2.18" diff --git a/aws/sdk/integration-tests/s3control/Cargo.toml b/aws/sdk/integration-tests/s3control/Cargo.toml index 758eb7096..6c7648eb2 100644 --- a/aws/sdk/integration-tests/s3control/Cargo.toml +++ b/aws/sdk/integration-tests/s3control/Cargo.toml @@ -1,22 +1,20 @@ # This Cargo.toml is unused in generated code. It exists solely to enable these tests to compile in-situ [package] -name = "s3control-tests" +name = "s3control" version = "0.1.0" authors = ["AWS Rust SDK Team "] edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] -aws-sdk-s3control = { path = "../../build/aws-sdk/sdk/s3control" } -aws-smithy-client = { path = "../../build/aws-sdk/sdk/aws-smithy-client", features = ["test-util"] } -aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } -tracing-subscriber = "0.2.18" - [dev-dependencies] aws-http = { path = "../../build/aws-sdk/sdk/aws-http"} aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper"} +aws-sdk-s3control = { path = "../../build/aws-sdk/sdk/s3control" } +aws-smithy-client = { path = "../../build/aws-sdk/sdk/aws-smithy-client", features = ["test-util"] } +aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } bytes = "1" http = "0.2.3" serde_json = "1" -tokio = { version = "1", features = ["full"]} +tokio = { version = "1", features = ["full", "test-util"]} +tracing-subscriber = "0.2.18" diff --git a/aws/sdk/integration-tests/s3control/tests/signing-it.rs b/aws/sdk/integration-tests/s3control/tests/signing-it.rs index d9521e9ee..30a68bb48 100644 --- a/aws/sdk/integration-tests/s3control/tests/signing-it.rs +++ b/aws/sdk/integration-tests/s3control/tests/signing-it.rs @@ -4,15 +4,14 @@ */ use aws_http::user_agent::AwsUserAgent; -use aws_sdk_s3control as s3control; +use aws_sdk_s3control::operation::ListAccessPoints; +use aws_sdk_s3control::{Credentials, Region}; use aws_smithy_client::test_connection::TestConnection; use aws_smithy_http::body::SdkBody; -use s3control::operation::ListAccessPoints; -use s3control::{Credentials, Region}; use std::time::{Duration, UNIX_EPOCH}; #[tokio::test] -async fn test_signer() -> Result<(), s3control::Error> { +async fn test_signer() -> Result<(), aws_sdk_s3control::Error> { let creds = Credentials::new( "ANOTREAL", "notrealrnrELgWzOk3IfjzDKtFBhDby", @@ -20,7 +19,7 @@ async fn test_signer() -> Result<(), s3control::Error> { None, "test", ); - let conf = s3control::Config::builder() + let conf = aws_sdk_s3control::Config::builder() .credentials_provider(creds) .region(Region::new("us-east-1")) .build(); diff --git a/aws/sdk/integration-tests/sts/Cargo.toml b/aws/sdk/integration-tests/sts/Cargo.toml index aa14c1be1..31d39a069 100644 --- a/aws/sdk/integration-tests/sts/Cargo.toml +++ b/aws/sdk/integration-tests/sts/Cargo.toml @@ -7,12 +7,10 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] +[dev-dependencies] +aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper"} aws-sdk-sts = { path = "../../build/aws-sdk/sdk/sts" } aws-smithy-client = { path = "../../build/aws-sdk/sdk/aws-smithy-client", features = ["test-util"] } aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" } +tokio = { version = "1", features = ["full", "test-util"]} tracing-subscriber = "0.2" - -[dev-dependencies] -tokio = { version = "1", features = ["full"]} -aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper"} diff --git a/aws/sdk/integration-tests/transcribestreaming/Cargo.toml b/aws/sdk/integration-tests/transcribestreaming/Cargo.toml index 967673d58..31b3c278c 100644 --- a/aws/sdk/integration-tests/transcribestreaming/Cargo.toml +++ b/aws/sdk/integration-tests/transcribestreaming/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["AWS Rust SDK Team ", "John DiSanti "] edition = "2018" -[dependencies] +[dev-dependencies] async-stream = "0.3" aws-http = { path = "../../build/aws-sdk/sdk/aws-http"} aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper"} @@ -17,5 +17,5 @@ futures-core = "0.3" hound = "3.4" http = "0.2.3" serde_json = "1" -tokio = { version = "1", features = ["full"]} +tokio = { version = "1", features = ["full", "test-util"]} tracing-subscriber = "0.2.18" -- GitLab