mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-20 01:11:25 +00:00
Activate Mongo Proxy in Prod (#1936)
* activate mongo proxy in mpac * activate mongo proxy in mpac * activate mongo proxy in prod * fixed parition key unit test * remove three part partition key value test --------- Co-authored-by: Asier Isayas <aisayas@microsoft.com>
This commit is contained in:
@@ -147,21 +147,5 @@ describe("Query Utils", () => {
|
||||
expect(expectedPartitionKeyValues).toContain(documentContent["Type"]);
|
||||
expect(expectedPartitionKeyValues).toContain(documentContent["Status"]);
|
||||
});
|
||||
|
||||
it("should extract three partition key values", () => {
|
||||
const multiPartitionKeyDefinition: PartitionKeyDefinition = {
|
||||
kind: PartitionKeyKind.MultiHash,
|
||||
paths: ["/Country", "/Region", "/Category"],
|
||||
};
|
||||
const expectedPartitionKeyValues: string[] = ["United States", "US-Washington", ""];
|
||||
const partitioinKeyValues: PartitionKey[] = extractPartitionKeyValues(
|
||||
documentContent,
|
||||
multiPartitionKeyDefinition,
|
||||
);
|
||||
expect(partitioinKeyValues.length).toBe(3);
|
||||
expect(expectedPartitionKeyValues).toContain(documentContent["Country"]);
|
||||
expect(expectedPartitionKeyValues).toContain(documentContent["Region"]);
|
||||
expect(expectedPartitionKeyValues).toContain(documentContent["Category"]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user