Skip to content

Commit 93166a5

Browse files
committed
clean up build warnings
1 parent e34626f commit 93166a5

File tree

5 files changed

+20
-19
lines changed

5 files changed

+20
-19
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*!
2+
* Shared integration testing facilities for testing API endpoints
3+
*/
4+
5+
use omicron_common::api::external::IdentityMetadata;
6+
7+
/** Returns whether the two identity metadata objects are identical. */
8+
pub fn identity_eq(ident1: &IdentityMetadata, ident2: &IdentityMetadata) {
9+
assert_eq!(ident1.id, ident2.id);
10+
assert_eq!(ident1.name, ident2.name);
11+
assert_eq!(ident1.description, ident2.description);
12+
assert_eq!(ident1.time_created, ident2.time_created);
13+
assert_eq!(ident1.time_modified, ident2.time_modified);
14+
}

omicron-nexus/tests/common/mod.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use dropshot::test_util::LogContext;
77
use dropshot::ConfigDropshot;
88
use dropshot::ConfigLogging;
99
use dropshot::ConfigLoggingLevel;
10-
use omicron_common::api::external::IdentityMetadata;
1110
use omicron_common::api::internal::nexus::ProducerEndpoint;
1211
use omicron_common::dev;
1312
use slog::o;
@@ -263,12 +262,3 @@ pub async fn start_producer_server(
263262
.map_err(|e| e.to_string())?;
264263
Ok(server)
265264
}
266-
267-
/** Returns whether the two identity metadata objects are identical. */
268-
pub fn identity_eq(ident1: &IdentityMetadata, ident2: &IdentityMetadata) {
269-
assert_eq!(ident1.id, ident2.id);
270-
assert_eq!(ident1.name, ident2.name);
271-
assert_eq!(ident1.description, ident2.description);
272-
assert_eq!(ident1.time_created, ident2.time_created);
273-
assert_eq!(ident1.time_modified, ident2.time_modified);
274-
}

omicron-nexus/tests/test_disks.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@ use dropshot::test_util::read_json;
2828
use dropshot::test_util::ClientTestContext;
2929

3030
pub mod common;
31-
use common::identity_eq;
3231
use common::resource_helpers::create_project;
3332
use common::test_setup;
34-
35-
#[macro_use]
36-
extern crate slog;
33+
pub mod api_common;
34+
use api_common::identity_eq;
3735

3836
/*
3937
* TODO-cleanup the mess of URLs used here and in test_instances.rs ought to

omicron-nexus/tests/test_instances.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@ use dropshot::test_util::read_json;
2525
use dropshot::test_util::ClientTestContext;
2626

2727
pub mod common;
28-
use common::identity_eq;
2928
use common::resource_helpers::create_project;
3029
use common::test_setup;
31-
32-
#[macro_use]
33-
extern crate slog;
30+
pub mod api_common;
31+
use api_common::identity_eq;
3432

3533
#[tokio::test]
3634
async fn test_instances() {

omicron-nexus/tests/test_vpcs.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ use dropshot::test_util::objects_list_page;
1111
use dropshot::test_util::ClientTestContext;
1212

1313
pub mod common;
14-
use common::identity_eq;
1514
use common::resource_helpers::{
1615
create_project, create_vpc, create_vpc_with_error,
1716
};
1817
use common::test_setup;
18+
pub mod api_common;
19+
use api_common::identity_eq;
1920

2021
extern crate slog;
2122

0 commit comments

Comments
 (0)