Update to ADO 5ed9b2130da7f822153531489d802c28986f5d30

This commit is contained in:
Steve Faulkner
2020-05-26 13:53:41 -05:00
parent 36581fb6d9
commit 0494da4162
42 changed files with 1186 additions and 2242 deletions

View File

@@ -259,15 +259,19 @@ describe("MongoProxyClient", () => {
sid: "a2",
rg: "c1",
dba: "main",
is: false
is: false,
isFixedCollectionWithSharedThroughputBeingCreated: true
};
_createMongoCollectionWithARM("management.azure.com", properties, { "x-ms-cosmos-offer-autopilot-tier": "1" });
expect(
resourceProviderClientPutAsyncSpy
).toHaveBeenCalledWith(
expect(resourceProviderClientPutAsyncSpy).toHaveBeenCalledWith(
"subscriptions/a2/resourceGroups/c1/providers/Microsoft.DocumentDB/databaseAccounts/foo/mongodbDatabases/a1-db/collections/abc-collection",
"2020-03-01",
{ properties: { options: { "x-ms-cosmos-offer-autopilot-tier": "1" }, resource: { id: "abc-collection" } } }
"2020-04-01",
{
properties: {
options: { "x-ms-cosmos-offer-autopilot-tier": "1", InsertSystemPartitionKey: "true" },
resource: { id: "abc-collection" }
}
}
);
});
it("should create a collection with provisioned throughput when provisioned throughput is selected + shared throughput is false", () => {
@@ -282,15 +286,19 @@ describe("MongoProxyClient", () => {
rg: "c1",
dba: "main",
is: false,
offerThroughput: 400
offerThroughput: 400,
isFixedCollectionWithSharedThroughputBeingCreated: true
};
_createMongoCollectionWithARM("management.azure.com", properties, undefined);
expect(
resourceProviderClientPutAsyncSpy
).toHaveBeenCalledWith(
expect(resourceProviderClientPutAsyncSpy).toHaveBeenCalledWith(
"subscriptions/a2/resourceGroups/c1/providers/Microsoft.DocumentDB/databaseAccounts/foo/mongodbDatabases/a1-db/collections/abc-collection",
"2020-03-01",
{ properties: { options: { throughput: "400" }, resource: { id: "abc-collection" } } }
"2020-04-01",
{
properties: {
options: { throughput: "400", InsertSystemPartitionKey: "true" },
resource: { id: "abc-collection" }
}
}
);
});
});