Skip to content

Commit 89df11a

Browse files
committed
remove extra clones and test cases
1 parent 51f8067 commit 89df11a

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

src/integration-tests/src/pubsub.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ pub async fn basic_topic(builder: pubsub::builder::topic_admin::ClientBuilder) -
4343
.send()
4444
.await?;
4545
tracing::info!("success with list_topics={topics:?}");
46-
assert!(topics.topics.iter().any(|x| x.name == topic.name.clone()));
46+
assert!(topics.topics.iter().any(|x| x.name == topic.name));
4747

48-
cleanup_test_topic(topic_admin, topic.name.clone()).await?;
48+
cleanup_test_topic(topic_admin, topic.name).await?;
4949

5050
Ok(())
5151
}
@@ -68,12 +68,12 @@ pub async fn create_test_topic() -> Result<(TopicAdmin, Topic)> {
6868
.with_tracing()
6969
.build()
7070
.await?;
71-
let topic_id = random_topic_id(project.clone());
71+
let topic_id = random_topic_id(project);
7272

7373
tracing::info!("testing create_topic()");
7474
let topic = client
7575
.create_topic()
76-
.set_name(topic_id.clone())
76+
.set_name(topic_id)
7777
.set_labels([("integration-test", "true")])
7878
.send()
7979
.await?;

src/integration-tests/tests/driver.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,13 @@ mod driver {
4747
.map_err(integration_tests::report_error)
4848
}
4949

50-
#[test_case(pubsub::client::TopicAdmin::builder(); "default")]
51-
#[test_case(pubsub::client::TopicAdmin::builder().with_tracing(); "with tracing enabled")]
52-
#[test_case(pubsub::client::TopicAdmin::builder().with_retry_policy(retry_policy()); "with retry enabled")]
5350
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
54-
async fn run_pubsub_basic_topic(
55-
builder: pubsub::builder::topic_admin::ClientBuilder,
56-
) -> integration_tests::Result<()> {
57-
integration_tests::pubsub::basic_topic(builder)
58-
.await
59-
.map_err(integration_tests::report_error)
51+
async fn run_pubsub_basic_topic() -> integration_tests::Result<()> {
52+
integration_tests::pubsub::basic_topic(
53+
pubsub::client::TopicAdmin::builder().with_retry_policy(retry_policy()),
54+
)
55+
.await
56+
.map_err(integration_tests::report_error)
6057
}
6158

6259
#[test_case(sm::client::SecretManagerService::builder(); "default")]

0 commit comments

Comments
 (0)