mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-20 09:20:16 +00:00
Update to ADO 64472154f607bb7b0820ef3d6a9f3ab6b058382d (#11)
This commit is contained in:
@@ -340,7 +340,6 @@ export class HttpHeaders {
|
||||
public static partitionKey: string = "x-ms-documentdb-partitionkey";
|
||||
public static migrateOfferToManualThroughput: string = "x-ms-cosmos-migrate-offer-to-manual-throughput";
|
||||
public static migrateOfferToAutopilot: string = "x-ms-cosmos-migrate-offer-to-autopilot";
|
||||
public static mongoFixedCollectionWithSharedThroughput: string = "InsertSystemPartitionKey";
|
||||
}
|
||||
|
||||
export class ApiType {
|
||||
|
||||
@@ -259,8 +259,7 @@ describe("MongoProxyClient", () => {
|
||||
sid: "a2",
|
||||
rg: "c1",
|
||||
dba: "main",
|
||||
is: false,
|
||||
isFixedCollectionWithSharedThroughputBeingCreated: true
|
||||
is: false
|
||||
};
|
||||
_createMongoCollectionWithARM("management.azure.com", properties, { "x-ms-cosmos-offer-autopilot-tier": "1" });
|
||||
expect(resourceProviderClientPutAsyncSpy).toHaveBeenCalledWith(
|
||||
@@ -268,7 +267,7 @@ describe("MongoProxyClient", () => {
|
||||
"2020-04-01",
|
||||
{
|
||||
properties: {
|
||||
options: { "x-ms-cosmos-offer-autopilot-tier": "1", InsertSystemPartitionKey: "true" },
|
||||
options: { "x-ms-cosmos-offer-autopilot-tier": "1" },
|
||||
resource: { id: "abc-collection" }
|
||||
}
|
||||
}
|
||||
@@ -286,8 +285,7 @@ describe("MongoProxyClient", () => {
|
||||
rg: "c1",
|
||||
dba: "main",
|
||||
is: false,
|
||||
offerThroughput: 400,
|
||||
isFixedCollectionWithSharedThroughputBeingCreated: true
|
||||
offerThroughput: 400
|
||||
};
|
||||
_createMongoCollectionWithARM("management.azure.com", properties, undefined);
|
||||
expect(resourceProviderClientPutAsyncSpy).toHaveBeenCalledWith(
|
||||
@@ -295,7 +293,7 @@ describe("MongoProxyClient", () => {
|
||||
"2020-04-01",
|
||||
{
|
||||
properties: {
|
||||
options: { throughput: "400", InsertSystemPartitionKey: "true" },
|
||||
options: { throughput: "400" },
|
||||
resource: { id: "abc-collection" }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,7 +356,6 @@ export function createMongoCollectionWithARM(
|
||||
armEndpoint: string,
|
||||
databaseId: string,
|
||||
analyticalStorageTtl: number,
|
||||
isFixedCollectionWithSharedThroughputBeingCreated: boolean,
|
||||
collectionId: string,
|
||||
offerThroughput: number,
|
||||
shardKey: string,
|
||||
@@ -380,8 +379,7 @@ export function createMongoCollectionWithARM(
|
||||
sid: CosmosClient.subscriptionId(),
|
||||
rg: CosmosClient.resourceGroup(),
|
||||
dba: databaseAccount.name,
|
||||
analyticalStorageTtl,
|
||||
isFixedCollectionWithSharedThroughputBeingCreated
|
||||
analyticalStorageTtl
|
||||
};
|
||||
|
||||
if (createDatabase) {
|
||||
@@ -453,11 +451,6 @@ export async function _createMongoCollectionWithARM(
|
||||
}
|
||||
}
|
||||
|
||||
if (params.isFixedCollectionWithSharedThroughputBeingCreated) {
|
||||
rpPayloadToCreateCollection.properties.options[Constants.HttpHeaders.mongoFixedCollectionWithSharedThroughput] =
|
||||
"true";
|
||||
}
|
||||
|
||||
if (params.analyticalStorageTtl) {
|
||||
rpPayloadToCreateCollection.properties.resource.analyticalStorageTtl = params.analyticalStorageTtl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user