Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ crate-type = ["cdylib"]

[dependencies]
anyhow = "1.0.99"
atlas-local = { git = "https://github.com/mongodb/atlas-local-lib.git", rev = "493fb78eb2f38228d486c8537274ab752f1eac04" }
atlas-local = { version = "0.1.0", default-features = false }
bollard = "0.19.4"
napi = { version = "^3.5.2", features = ["async", "anyhow"] }
napi-derive = "^3.3.3"
Expand Down
2 changes: 1 addition & 1 deletion LICENSE-3RD-PARTY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -863,8 +863,8 @@ OVERVIEW OF LICENSES:
-----------------------------------------------------------------------------
Apache License 2.0
applies to:
- atlas-local 0.1.0
- atlas_local 1.1.0
- atlas-local 0.1.0 (https://github.com/mongodb/atlas-local-lib)
-----------------------------------------------------------------------------

Apache License
Expand Down
16 changes: 10 additions & 6 deletions src/models/list_deployments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl From<atlas_local::models::MongoDBPortBinding> for MongoDBPortBinding {
ip: "0.0.0.0".to_string(),
port: source.port,
},
SourceType::Specific(ip) => MongoDBPortBinding {
SourceType::Specific { ip } => MongoDBPortBinding {
binding_type: BindingType::Specific,
ip: ip.to_string(),
port: source.port,
Expand All @@ -165,9 +165,9 @@ impl From<MongoDBPortBinding> for atlas_local::models::MongoDBPortBinding {
port: source.port,
},
BindingType::Specific => atlas_local::models::MongoDBPortBinding {
binding_type: atlas_local::models::BindingType::Specific(
source.ip.parse::<IpAddr>().expect("Parse IP address"),
),
binding_type: atlas_local::models::BindingType::Specific {
ip: source.ip.parse::<IpAddr>().expect("Parse IP address"),
},
port: source.port,
},
}
Expand Down Expand Up @@ -337,7 +337,9 @@ mod tests {
#[test]
fn test_mongodb_port_binding_from_lib_mongodb_port_binding_specific() {
let lib_mongodb_port_binding = atlas_local::models::MongoDBPortBinding {
binding_type: atlas_local::models::BindingType::Specific("192.0.2.0".parse().unwrap()),
binding_type: atlas_local::models::BindingType::Specific {
ip: "192.0.2.0".parse().unwrap(),
},
port: Some(27017),
};
let mongodb_port_binding: MongoDBPortBinding = lib_mongodb_port_binding.into();
Expand Down Expand Up @@ -388,7 +390,9 @@ mod tests {
mongodb_port_binding.into();
assert_eq!(
lib_mongodb_port_binding.binding_type,
atlas_local::models::BindingType::Specific("192.0.2.0".parse().unwrap())
atlas_local::models::BindingType::Specific {
ip: "192.0.2.0".parse().unwrap()
}
);
assert_eq!(lib_mongodb_port_binding.port, Some(27017));
}
Expand Down