Skip to content

Commit 4dcd063

Browse files
feat: Added get_deployment_id
1 parent bbd569b commit 4dcd063

File tree

8 files changed

+4912
-154
lines changed

8 files changed

+4912
-154
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ crate-type = ["cdylib"]
1010

1111
[dependencies]
1212
anyhow = "1.0.99"
13-
atlas-local = { git = "https://github.com/mongodb/atlas-local-lib.git", rev = "df190245295e6675949fb5c63a164fadc0007dab" }
13+
atlas-local = { git = "https://github.com/mongodb/atlas-local-lib.git", rev = "f874fe90553e5158034aea0587669f0e8ac75127" }
1414
bollard = "0.19.2"
1515
napi = { version = "^3.3.0", features = ["async", "anyhow"] }
1616
napi-derive = "^3.2.5"

__test__/index.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ test('smoke test', async (t) => {
3737
let deployment = await client.createDeployment(createDeploymentOptions)
3838
t.is(deployment.name, createDeploymentOptions.name)
3939

40+
// Get the deployment id twice, make sure it's the same
41+
let deploymentId = await client.getDeploymentId(createDeploymentOptions.name)
42+
let deploymentId2 = await client.getDeploymentId(createDeploymentOptions.name)
43+
t.is(deploymentId, deploymentId2)
44+
4045
// Get deployment
4146
let getDeployment = await client.getDeployment(createDeploymentOptions.name)
4247
t.is(getDeployment.name,createDeploymentOptions.name)

index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export declare class Client {
77
deleteDeployment(deploymentName: string): Promise<void>
88
getDeployment(deploymentName: string): Promise<Deployment>
99
getConnectionString(options: GetConnectionStringOptions): Promise<string>
10+
getDeploymentId(clusterIdOrName: string): Promise<string>
1011
}
1112

1213
export declare const enum BindingType {

index.js

Lines changed: 50 additions & 50 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)