@fluidframework/azure-end-to-end-tests 2.11.0 → 2.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @fluidframework/azure-end-to-end-tests
2
2
 
3
+ ## 2.12.0
4
+
5
+ Dependency updates only.
6
+
3
7
  ## 2.11.0
4
8
 
5
9
  Dependency updates only.
package/README.md CHANGED
@@ -1,10 +1,11 @@
1
1
  # @fluidframework/azure-end-to-end-tests
2
2
 
3
- Functional end-to-end tests for FRS and Azure Local Service. Here we evaluate various scenarios that involving azure-client, IFluidContainer and a range of distributed data structures (DDSes).
3
+ Functional end-to-end tests for Azure Fluid Relay (AFR) and Azure Local Service.
4
+ Here we evaluate various scenarios involving `azure-client`, `IFluidContainer` and a range of distributed data structures (DDSes).
4
5
 
5
- To run FRS e2e tests: `test:realsvc:azure`.
6
+ To run AFR end-to-end tests: `test:realsvc:azure`.
6
7
 
7
- To run Azure Local Service e2e tests: `test:realsvc`.
8
+ To run Azure Local Service end-to-end tests: `test:realsvc`.
8
9
 
9
10
  <!-- AUTO-GENERATED-CONTENT:START (README_FOOTER) -->
10
11
 
@@ -30,7 +30,7 @@ export function createAzureClient(id, name, logger, configProvider, scopes) {
30
30
  };
31
31
  const endPoint = process.env.azure__fluid__relay__service__endpoint;
32
32
  if (useAzure && endPoint === undefined) {
33
- throw new Error("Azure FRS endpoint is missing");
33
+ throw new Error("Azure Fluid Relay service endpoint is missing");
34
34
  }
35
35
  // use AzureClient remote mode will run against live Azure Fluid Relay.
36
36
  // Default to running Tinylicious for PR validation
@@ -86,7 +86,7 @@ export function createAzureClientLegacy(userID, userName, logger) {
86
86
  };
87
87
  const endPoint = process.env.azure__fluid__relay__service__endpoint;
88
88
  if (useAzure && endPoint === undefined) {
89
- throw new Error("Azure FRS endpoint is missing");
89
+ throw new Error("Azure Azure Fluid Relay service endpoint is missing");
90
90
  }
91
91
  // use AzureClient remote mode will run against live Azure Fluid Relay.
92
92
  // Default to running Tinylicious for PR validation
@@ -146,7 +146,7 @@ export async function createContainerFromPayload(requestPayload, userID, userNam
146
146
  ? process.env.azure__fluid__relay__service__endpoint
147
147
  : "http://localhost:7071";
148
148
  if (useAzure && endPoint === undefined) {
149
- throw new Error("Azure FRS endpoint is missing");
149
+ throw new Error("Azure Fluid Relay service endpoint is missing");
150
150
  }
151
151
  const tokenProvider = useAzure
152
152
  ? createAzureTokenProvider(userID ?? "foo", userName ?? "bar")
@@ -1 +1 @@
1
- {"version":3,"file":"AzureClientFactory.js","sourceRoot":"","sources":["../../src/test/AzureClientFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,WAAW,GAIX,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACN,WAAW,IAAI,iBAAiB,GAIhC,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAEN,iBAAiB,EACjB,qBAAqB,GACrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,KAAK,EAA0C,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAElE;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAChC,EAAW,EACX,IAAa,EACb,MAAmB,EACnB,cAAoC,EACpC,MAAoB;IAEpB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAEnC,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC7C,MAAM,qBAAqB,GAAG,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjE,uCAAuC;IACvC,MAAM,MAAM,GAAG,WAAW,KAAK,CAAC,C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I,KAAK,SAAS,IAAI,CAAC,QAAQ,IAAI,QAAQ,EAAE,IAAI,EAAE,EAAE,KAAK,SAAS,CAAC,EAAE,CAAC;YACpF,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC7D,CAAC;QAED,OAAO,QAAQ,CAAC;IACjB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,sBAAsB,KAAK,EAAE,CAAC,CAAC;IAChD,CAAC;AACF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iCAAiC,CAAC,QAAuB;IACxE,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,OAAO,CAAC;IACtD,sEAAsE;IACtE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAW,CAAC;AAChE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tAzureClient,\n\tAzureLocalConnectionConfig,\n\tAzureRemoteConnectionConfig,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/azure-client\";\nimport { type ScopeType } from \"@fluidframework/azure-client/internal\";\nimport {\n\tAzureClient as AzureClientLegacy,\n\tAzureLocalConnectionConfig as AzureLocalConnectionConfigLegacy,\n\tAzureRemoteConnectionConfig as AzureRemoteConnectionConfigLegacy,\n\tITelemetryBaseLogger as ITelemetryBaseLoggerLegacy,\n} from \"@fluidframework/azure-client-legacy\";\nimport { IConfigProviderBase } from \"@fluidframework/core-interfaces\";\nimport {\n\tMockLogger,\n\tcreateChildLogger,\n\tcreateMultiSinkLogger,\n} from \"@fluidframework/telemetry-utils/internal\";\nimport { InsecureTokenProvider } from \"@fluidframework/test-runtime-utils/internal\";\nimport { default as Axios, AxiosResponse, type AxiosRequestConfig } from \"axios\";\nimport { v4 as uuid } from \"uuid\";\n\nimport { createAzureTokenProvider } from \"./AzureTokenFactory.js\";\n\n/**\n * This function will determine if local or remote mode is required (based on FLUID_CLIENT), and return a new\n * {@link AzureClient} instance based on the mode by setting the Connection config accordingly.\n */\nexport function createAzureClient(\n\tid?: string,\n\tname?: string,\n\tlogger?: MockLogger,\n\tconfigProvider?: IConfigProviderBase,\n\tscopes?: ScopeType[],\n): AzureClient {\n\tconst args = process.argv.slice(2);\n\n\tconst driverIndex = args.indexOf(\"--driver\");\n\tconst r11sEndpointNameIndex = args.indexOf(\"--r11sEndpointName\");\n\n\t// Get values associated with the flags\n\tconst driver = driverIndex === -1 ? undefined : args[driverIndex + 1];\n\tconst r11sEndpointName =\n\t\tr11sEndpointNameIndex === -1 ? undefined : args[r11sEndpointNameIndex + 1];\n\n\tconst useAzure = process.env.FLUID_CLIENT === \"azure\";\n\tconst tenantId = useAzure\n\t\t? (process.env.azure__fluid__relay__service__tenantId as string)\n\t\t: \"frs-client-tenant\";\n\tconst user = {\n\t\tid: id ?? uuid(),\n\t\tname: name ?? uuid(),\n\t};\n\tconst endPoint = process.env.azure__fluid__relay__service__endpoint as string;\n\tif (useAzure && endPoint === undefined) {\n\t\tthrow new Error(\"Azure FRS endpoint is missing\");\n\t}\n\n\t// use AzureClient remote mode will run against live Azure Fluid Relay.\n\t// Default to running Tinylicious for PR validation\n\t// and local testing so it's not hindered by service availability\n\tconst connectionProps: AzureRemoteConnectionConfig | AzureLocalConnectionConfig = useAzure\n\t\t? {\n\t\t\t\ttenantId,\n\t\t\t\ttokenProvider: createAzureTokenProvider(id ?? \"foo\", name ?? \"bar\", scopes),\n\t\t\t\tendpoint: endPoint,\n\t\t\t\ttype: \"remote\",\n\t\t\t}\n\t\t: {\n\t\t\t\ttokenProvider: new InsecureTokenProvider(\"fooBar\", user, scopes),\n\t\t\t\tendpoint: \"http://localhost:7071\",\n\t\t\t\ttype: \"local\",\n\t\t\t};\n\tconst getLogger = (): ITelemetryBaseLogger | undefined => {\n\t\tconst testLogger = getTestLogger?.();\n\t\tif (!logger && !testLogger) {\n\t\t\treturn undefined;\n\t\t}\n\t\tif (logger && testLogger) {\n\t\t\treturn createMultiSinkLogger({ loggers: [logger, testLogger] });\n\t\t}\n\t\treturn logger ?? testLogger;\n\t};\n\n\tconst createLogger = createChildLogger({\n\t\tlogger: getLogger(),\n\t\tproperties: {\n\t\t\tall: {\n\t\t\t\tdriverType: useAzure ? r11sEndpointName : driver,\n\t\t\t\tdriverEndpointName: driver,\n\t\t\t},\n\t\t},\n\t});\n\treturn new AzureClient({\n\t\tconnection: connectionProps,\n\t\tlogger: createLogger,\n\t\tconfigProvider,\n\t});\n}\n\n/**\n * Copy of {@link createAzureClient} with legacy (LTS) AzureClient APIs.\n */\nexport function createAzureClientLegacy(\n\tuserID?: string,\n\tuserName?: string,\n\tlogger?: MockLogger,\n): AzureClientLegacy {\n\tconst useAzure = process.env.FLUID_CLIENT === \"azure\";\n\tconst tenantId = useAzure\n\t\t? (process.env.azure__fluid__relay__service__tenantId as string)\n\t\t: \"frs-client-tenant\";\n\tconst user = {\n\t\tid: userID ?? uuid(),\n\t\tname: userName ?? uuid(),\n\t};\n\tconst endPoint = process.env.azure__fluid__relay__service__endpoint as string;\n\tif (useAzure && endPoint === undefined) {\n\t\tthrow new Error(\"Azure FRS endpoint is missing\");\n\t}\n\n\t// use AzureClient remote mode will run against live Azure Fluid Relay.\n\t// Default to running Tinylicious for PR validation\n\t// and local testing so it's not hindered by service availability\n\tconst connectionProps: AzureRemoteConnectionConfigLegacy | AzureLocalConnectionConfigLegacy =\n\t\tuseAzure\n\t\t\t? {\n\t\t\t\t\ttenantId,\n\t\t\t\t\ttokenProvider: createAzureTokenProvider(userID ?? \"foo\", userName ?? \"bar\"),\n\t\t\t\t\tendpoint: endPoint,\n\t\t\t\t\ttype: \"remote\",\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\ttokenProvider: new InsecureTokenProvider(\"fooBar\", user),\n\t\t\t\t\tendpoint: \"http://localhost:7071\",\n\t\t\t\t\ttype: \"local\",\n\t\t\t\t};\n\tconst getLogger = (): ITelemetryBaseLoggerLegacy | undefined => {\n\t\tconst testLogger = getTestLogger?.();\n\t\tif (!logger && !testLogger) {\n\t\t\treturn undefined;\n\t\t}\n\t\tif (logger && testLogger) {\n\t\t\treturn createMultiSinkLogger({ loggers: [logger, testLogger] });\n\t\t}\n\t\treturn logger ?? testLogger;\n\t};\n\treturn new AzureClientLegacy({\n\t\tconnection: connectionProps,\n\t\tlogger: getLogger(),\n\t});\n}\n\n/**\n * This function is used to create a container using any summary payload.\n * It is primary intended as a workaround to using the AzureClient, and\n * is only being used at the moment for ephemeral container E2E tests\n * since AzureClient does not currently support ephemeral containers.\n *\n * Usage of this function for anything other than ephemeral E2E tests is\n * not recommended.\n *\n * @param requestPayload - The summary payload used to create the container,\n * currently these are mainly fetched from ephemeralSummaryTrees.ts\n * @param userID - ID for the user creating the container\n * @param userName - Name for the user creating the container\n * @returns - An AxiosResponse containing the container ID(response.data.id)\n */\nexport async function createContainerFromPayload(\n\trequestPayload: object,\n\tuserID?: string,\n\tuserName?: string,\n): Promise<AxiosResponse> {\n\tconst useAzure = process.env.FLUID_CLIENT === \"azure\";\n\tconst tenantId = useAzure\n\t\t? (process.env.azure__fluid__relay__service__tenantId as string)\n\t\t: \"local\";\n\tconst user = {\n\t\tid: userID ?? uuid(),\n\t\tname: userName ?? uuid(),\n\t};\n\tconst endPoint = useAzure\n\t\t? (process.env.azure__fluid__relay__service__endpoint as string)\n\t\t: \"http://localhost:7071\";\n\tif (useAzure && endPoint === undefined) {\n\t\tthrow new Error(\"Azure FRS endpoint is missing\");\n\t}\n\n\tconst tokenProvider = useAzure\n\t\t? createAzureTokenProvider(userID ?? \"foo\", userName ?? \"bar\")\n\t\t: new InsecureTokenProvider(\"fooBar\", user);\n\tconst ordererToken = await tokenProvider.fetchOrdererToken(tenantId, undefined, false);\n\n\tconst headers = {\n\t\t\"Authorization\": `Basic ${ordererToken.jwt}`,\n\t\t\"Content-Type\": \"application/json\",\n\t};\n\n\tconst url = `/documents/${tenantId}`;\n\n\tconst options: AxiosRequestConfig = {\n\t\tbaseURL: endPoint,\n\t\tdata: requestPayload,\n\t\theaders,\n\t\tmaxBodyLength: 1048576000,\n\t\tmaxContentLength: 1048576000,\n\t\tmethod: \"POST\",\n\t\turl,\n\t};\n\n\ttry {\n\t\tconst response: AxiosResponse = await Axios(options);\n\n\t\tif (response.status === 201) {\n\t\t\tconsole.log(\"Container created successfully\");\n\t\t} else {\n\t\t\tthrow new Error(`Error creating container. Status code: ${response.status}`);\n\t\t}\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\t\tif (response?.data === undefined || (useAzure && response?.data?.id === undefined)) {\n\t\t\tthrow new Error(`ID of the created container is undefined`);\n\t\t}\n\n\t\treturn response;\n\t} catch (error) {\n\t\tthrow new Error(`An error occurred: ${error}`);\n\t}\n}\n\n/**\n * This function takes an AxiosResponse returned by the createContainerFromPayload and returns the containerId.\n * A separate function is used for this, since the data path to the containerID is not always the same.\n * (Tinylicious has the ID stored at a different path than other services)\n *\n * @param response - A container creation response returned by createContainerFromPayload\n * @returns - The ID of the container that was created by createContainerFromPayload\n */\nexport function getContainerIdFromPayloadResponse(response: AxiosResponse): string {\n\tconst useAzure = process.env.FLUID_CLIENT === \"azure\";\n\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\treturn (useAzure ? response.data.id : response.data) as string;\n}\n"]}
1
+ {"version":3,"file":"AzureClientFactory.js","sourceRoot":"","sources":["../../src/test/AzureClientFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,WAAW,GAIX,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACN,WAAW,IAAI,iBAAiB,GAIhC,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAEN,iBAAiB,EACjB,qBAAqB,GACrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MA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T License.\n */\n\nimport {\n\tAzureClient,\n\tAzureLocalConnectionConfig,\n\tAzureRemoteConnectionConfig,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/azure-client\";\nimport { type ScopeType } from \"@fluidframework/azure-client/internal\";\nimport {\n\tAzureClient as AzureClientLegacy,\n\tAzureLocalConnectionConfig as AzureLocalConnectionConfigLegacy,\n\tAzureRemoteConnectionConfig as AzureRemoteConnectionConfigLegacy,\n\tITelemetryBaseLogger as ITelemetryBaseLoggerLegacy,\n} from \"@fluidframework/azure-client-legacy\";\nimport { IConfigProviderBase } from \"@fluidframework/core-interfaces\";\nimport {\n\tMockLogger,\n\tcreateChildLogger,\n\tcreateMultiSinkLogger,\n} from \"@fluidframework/telemetry-utils/internal\";\nimport { InsecureTokenProvider } from \"@fluidframework/test-runtime-utils/internal\";\nimport { default as Axios, AxiosResponse, type AxiosRequestConfig } from \"axios\";\nimport { v4 as uuid } from \"uuid\";\n\nimport { createAzureTokenProvider } from \"./AzureTokenFactory.js\";\n\n/**\n * This function will determine if local or remote mode is required (based on FLUID_CLIENT), and return a new\n * {@link AzureClient} instance based on the mode by setting the Connection config accordingly.\n */\nexport function createAzureClient(\n\tid?: string,\n\tname?: string,\n\tlogger?: MockLogger,\n\tconfigProvider?: IConfigProviderBase,\n\tscopes?: ScopeType[],\n): AzureClient {\n\tconst args = process.argv.slice(2);\n\n\tconst driverIndex = args.indexOf(\"--driver\");\n\tconst r11sEndpointNameIndex = args.indexOf(\"--r11sEndpointName\");\n\n\t// Get values associated with the flags\n\tconst driver = driverIndex === -1 ? undefined : args[driverIndex + 1];\n\tconst r11sEndpointName =\n\t\tr11sEndpointNameIndex === -1 ? undefined : args[r11sEndpointNameIndex + 1];\n\n\tconst useAzure = process.env.FLUID_CLIENT === \"azure\";\n\tconst tenantId = useAzure\n\t\t? (process.env.azure__fluid__relay__service__tenantId as string)\n\t\t: \"frs-client-tenant\";\n\tconst user = {\n\t\tid: id ?? uuid(),\n\t\tname: name ?? uuid(),\n\t};\n\tconst endPoint = process.env.azure__fluid__relay__service__endpoint as string;\n\tif (useAzure && endPoint === undefined) {\n\t\tthrow new Error(\"Azure Fluid Relay service endpoint is missing\");\n\t}\n\n\t// use AzureClient remote mode will run against live Azure Fluid Relay.\n\t// Default to running Tinylicious for PR validation\n\t// and local testing so it's not hindered by service availability\n\tconst connectionProps: AzureRemoteConnectionConfig | AzureLocalConnectionConfig = useAzure\n\t\t? {\n\t\t\t\ttenantId,\n\t\t\t\ttokenProvider: createAzureTokenProvider(id ?? \"foo\", name ?? \"bar\", scopes),\n\t\t\t\tendpoint: endPoint,\n\t\t\t\ttype: \"remote\",\n\t\t\t}\n\t\t: {\n\t\t\t\ttokenProvider: new InsecureTokenProvider(\"fooBar\", user, scopes),\n\t\t\t\tendpoint: \"http://localhost:7071\",\n\t\t\t\ttype: \"local\",\n\t\t\t};\n\tconst getLogger = (): ITelemetryBaseLogger | undefined => {\n\t\tconst testLogger = getTestLogger?.();\n\t\tif (!logger && !testLogger) {\n\t\t\treturn undefined;\n\t\t}\n\t\tif (logger && testLogger) {\n\t\t\treturn createMultiSinkLogger({ loggers: [logger, testLogger] });\n\t\t}\n\t\treturn logger ?? testLogger;\n\t};\n\n\tconst createLogger = createChildLogger({\n\t\tlogger: getLogger(),\n\t\tproperties: {\n\t\t\tall: {\n\t\t\t\tdriverType: useAzure ? r11sEndpointName : driver,\n\t\t\t\tdriverEndpointName: driver,\n\t\t\t},\n\t\t},\n\t});\n\treturn new AzureClient({\n\t\tconnection: connectionProps,\n\t\tlogger: createLogger,\n\t\tconfigProvider,\n\t});\n}\n\n/**\n * Copy of {@link createAzureClient} with legacy (LTS) AzureClient APIs.\n */\nexport function createAzureClientLegacy(\n\tuserID?: string,\n\tuserName?: string,\n\tlogger?: MockLogger,\n): AzureClientLegacy {\n\tconst useAzure = process.env.FLUID_CLIENT === \"azure\";\n\tconst tenantId = useAzure\n\t\t? (process.env.azure__fluid__relay__service__tenantId as string)\n\t\t: \"frs-client-tenant\";\n\tconst user = {\n\t\tid: userID ?? uuid(),\n\t\tname: userName ?? uuid(),\n\t};\n\tconst endPoint = process.env.azure__fluid__relay__service__endpoint as string;\n\tif (useAzure && endPoint === undefined) {\n\t\tthrow new Error(\"Azure Azure Fluid Relay service endpoint is missing\");\n\t}\n\n\t// use AzureClient remote mode will run against live Azure Fluid Relay.\n\t// Default to running Tinylicious for PR validation\n\t// and local testing so it's not hindered by service availability\n\tconst connectionProps: AzureRemoteConnectionConfigLegacy | AzureLocalConnectionConfigLegacy =\n\t\tuseAzure\n\t\t\t? {\n\t\t\t\t\ttenantId,\n\t\t\t\t\ttokenProvider: createAzureTokenProvider(userID ?? \"foo\", userName ?? \"bar\"),\n\t\t\t\t\tendpoint: endPoint,\n\t\t\t\t\ttype: \"remote\",\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\ttokenProvider: new InsecureTokenProvider(\"fooBar\", user),\n\t\t\t\t\tendpoint: \"http://localhost:7071\",\n\t\t\t\t\ttype: \"local\",\n\t\t\t\t};\n\tconst getLogger = (): ITelemetryBaseLoggerLegacy | undefined => {\n\t\tconst testLogger = getTestLogger?.();\n\t\tif (!logger && !testLogger) {\n\t\t\treturn undefined;\n\t\t}\n\t\tif (logger && testLogger) {\n\t\t\treturn createMultiSinkLogger({ loggers: [logger, testLogger] });\n\t\t}\n\t\treturn logger ?? testLogger;\n\t};\n\treturn new AzureClientLegacy({\n\t\tconnection: connectionProps,\n\t\tlogger: getLogger(),\n\t});\n}\n\n/**\n * This function is used to create a container using any summary payload.\n * It is primary intended as a workaround to using the AzureClient, and\n * is only being used at the moment for ephemeral container E2E tests\n * since AzureClient does not currently support ephemeral containers.\n *\n * Usage of this function for anything other than ephemeral E2E tests is\n * not recommended.\n *\n * @param requestPayload - The summary payload used to create the container,\n * currently these are mainly fetched from ephemeralSummaryTrees.ts\n * @param userID - ID for the user creating the container\n * @param userName - Name for the user creating the container\n * @returns - An AxiosResponse containing the container ID(response.data.id)\n */\nexport async function createContainerFromPayload(\n\trequestPayload: object,\n\tuserID?: string,\n\tuserName?: string,\n): Promise<AxiosResponse> {\n\tconst useAzure = process.env.FLUID_CLIENT === \"azure\";\n\tconst tenantId = useAzure\n\t\t? (process.env.azure__fluid__relay__service__tenantId as string)\n\t\t: \"local\";\n\tconst user = {\n\t\tid: userID ?? uuid(),\n\t\tname: userName ?? uuid(),\n\t};\n\tconst endPoint = useAzure\n\t\t? (process.env.azure__fluid__relay__service__endpoint as string)\n\t\t: \"http://localhost:7071\";\n\tif (useAzure && endPoint === undefined) {\n\t\tthrow new Error(\"Azure Fluid Relay service endpoint is missing\");\n\t}\n\n\tconst tokenProvider = useAzure\n\t\t? createAzureTokenProvider(userID ?? \"foo\", userName ?? \"bar\")\n\t\t: new InsecureTokenProvider(\"fooBar\", user);\n\tconst ordererToken = await tokenProvider.fetchOrdererToken(tenantId, undefined, false);\n\n\tconst headers = {\n\t\t\"Authorization\": `Basic ${ordererToken.jwt}`,\n\t\t\"Content-Type\": \"application/json\",\n\t};\n\n\tconst url = `/documents/${tenantId}`;\n\n\tconst options: AxiosRequestConfig = {\n\t\tbaseURL: endPoint,\n\t\tdata: requestPayload,\n\t\theaders,\n\t\tmaxBodyLength: 1048576000,\n\t\tmaxContentLength: 1048576000,\n\t\tmethod: \"POST\",\n\t\turl,\n\t};\n\n\ttry {\n\t\tconst response: AxiosResponse = await Axios(options);\n\n\t\tif (response.status === 201) {\n\t\t\tconsole.log(\"Container created successfully\");\n\t\t} else {\n\t\t\tthrow new Error(`Error creating container. Status code: ${response.status}`);\n\t\t}\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\t\tif (response?.data === undefined || (useAzure && response?.data?.id === undefined)) {\n\t\t\tthrow new Error(`ID of the created container is undefined`);\n\t\t}\n\n\t\treturn response;\n\t} catch (error) {\n\t\tthrow new Error(`An error occurred: ${error}`);\n\t}\n}\n\n/**\n * This function takes an AxiosResponse returned by the createContainerFromPayload and returns the containerId.\n * A separate function is used for this, since the data path to the containerID is not always the same.\n * (Tinylicious has the ID stored at a different path than other services)\n *\n * @param response - A container creation response returned by createContainerFromPayload\n * @returns - The ID of the container that was created by createContainerFromPayload\n */\nexport function getContainerIdFromPayloadResponse(response: AxiosResponse): string {\n\tconst useAzure = process.env.FLUID_CLIENT === \"azure\";\n\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\treturn (useAzure ? response.data.id : response.data) as string;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/azure-end-to-end-tests",
3
- "version": "2.11.0",
3
+ "version": "2.12.0",
4
4
  "description": "Azure client end to end tests",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -33,28 +33,28 @@
33
33
  "temp-directory": "nyc/.nyc_output"
34
34
  },
35
35
  "dependencies": {
36
- "@fluid-experimental/data-objects": "~2.11.0",
37
- "@fluid-internal/client-utils": "~2.11.0",
38
- "@fluid-internal/mocha-test-setup": "~2.11.0",
39
- "@fluid-private/test-version-utils": "~2.11.0",
40
- "@fluidframework/aqueduct": "~2.11.0",
41
- "@fluidframework/azure-client": "~2.11.0",
36
+ "@fluid-experimental/data-objects": "~2.12.0",
37
+ "@fluid-internal/client-utils": "~2.12.0",
38
+ "@fluid-internal/mocha-test-setup": "~2.12.0",
39
+ "@fluid-private/test-version-utils": "~2.12.0",
40
+ "@fluidframework/aqueduct": "~2.12.0",
41
+ "@fluidframework/azure-client": "~2.12.0",
42
42
  "@fluidframework/azure-client-legacy": "npm:@fluidframework/azure-client@^1.2.0",
43
- "@fluidframework/container-definitions": "~2.11.0",
44
- "@fluidframework/container-loader": "~2.11.0",
45
- "@fluidframework/core-interfaces": "~2.11.0",
46
- "@fluidframework/counter": "~2.11.0",
47
- "@fluidframework/datastore-definitions": "~2.11.0",
48
- "@fluidframework/fluid-static": "~2.11.0",
49
- "@fluidframework/map": "~2.11.0",
43
+ "@fluidframework/container-definitions": "~2.12.0",
44
+ "@fluidframework/container-loader": "~2.12.0",
45
+ "@fluidframework/core-interfaces": "~2.12.0",
46
+ "@fluidframework/counter": "~2.12.0",
47
+ "@fluidframework/datastore-definitions": "~2.12.0",
48
+ "@fluidframework/fluid-static": "~2.12.0",
49
+ "@fluidframework/map": "~2.12.0",
50
50
  "@fluidframework/map-legacy": "npm:@fluidframework/map@^1.4.0",
51
- "@fluidframework/matrix": "~2.11.0",
52
- "@fluidframework/runtime-definitions": "~2.11.0",
53
- "@fluidframework/sequence": "~2.11.0",
54
- "@fluidframework/telemetry-utils": "~2.11.0",
55
- "@fluidframework/test-runtime-utils": "~2.11.0",
56
- "@fluidframework/test-utils": "~2.11.0",
57
- "@fluidframework/tree": "~2.11.0",
51
+ "@fluidframework/matrix": "~2.12.0",
52
+ "@fluidframework/runtime-definitions": "~2.12.0",
53
+ "@fluidframework/sequence": "~2.12.0",
54
+ "@fluidframework/telemetry-utils": "~2.12.0",
55
+ "@fluidframework/test-runtime-utils": "~2.12.0",
56
+ "@fluidframework/test-utils": "~2.12.0",
57
+ "@fluidframework/tree": "~2.12.0",
58
58
  "axios": "^1.7.7",
59
59
  "cross-env": "^7.0.3",
60
60
  "mocha": "^10.2.0",
@@ -69,7 +69,7 @@
69
69
  "@biomejs/biome": "~1.9.3",
70
70
  "@fluidframework/build-common": "^2.0.3",
71
71
  "@fluidframework/build-tools": "^0.51.0",
72
- "@fluidframework/driver-definitions": "~2.11.0",
72
+ "@fluidframework/driver-definitions": "~2.12.0",
73
73
  "@fluidframework/eslint-config-fluid": "^5.6.0",
74
74
  "@types/mocha": "^9.1.1",
75
75
  "@types/nock": "^9.3.0",
@@ -59,7 +59,7 @@ export function createAzureClient(
59
59
  };
60
60
  const endPoint = process.env.azure__fluid__relay__service__endpoint as string;
61
61
  if (useAzure && endPoint === undefined) {
62
- throw new Error("Azure FRS endpoint is missing");
62
+ throw new Error("Azure Fluid Relay service endpoint is missing");
63
63
  }
64
64
 
65
65
  // use AzureClient remote mode will run against live Azure Fluid Relay.
@@ -122,7 +122,7 @@ export function createAzureClientLegacy(
122
122
  };
123
123
  const endPoint = process.env.azure__fluid__relay__service__endpoint as string;
124
124
  if (useAzure && endPoint === undefined) {
125
- throw new Error("Azure FRS endpoint is missing");
125
+ throw new Error("Azure Azure Fluid Relay service endpoint is missing");
126
126
  }
127
127
 
128
128
  // use AzureClient remote mode will run against live Azure Fluid Relay.
@@ -189,7 +189,7 @@ export async function createContainerFromPayload(
189
189
  ? (process.env.azure__fluid__relay__service__endpoint as string)
190
190
  : "http://localhost:7071";
191
191
  if (useAzure && endPoint === undefined) {
192
- throw new Error("Azure FRS endpoint is missing");
192
+ throw new Error("Azure Fluid Relay service endpoint is missing");
193
193
  }
194
194
 
195
195
  const tokenProvider = useAzure