@fluidframework/azure-end-to-end-tests 2.10.0 → 2.11.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/.eslintrc.cjs CHANGED
@@ -8,6 +8,7 @@ module.exports = {
8
8
  rules: {
9
9
  "prefer-arrow-callback": "off",
10
10
  "@typescript-eslint/strict-boolean-expressions": "off", // requires strictNullChecks=true in tsconfig
11
+ "@fluid-internal/fluid/no-unchecked-record-access": "warn",
11
12
  },
12
13
  parserOptions: {
13
14
  project: ["./src/test/tsconfig.json"],
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @fluidframework/azure-end-to-end-tests
2
2
 
3
+ ## 2.11.0
4
+
5
+ Dependency updates only.
6
+
3
7
  ## 2.10.0
4
8
 
5
9
  Dependency updates only.
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { AzureClient, } from "@fluidframework/azure-client";
6
6
  import { AzureClient as AzureClientLegacy, } from "@fluidframework/azure-client-legacy";
7
- import { createMultiSinkLogger } from "@fluidframework/telemetry-utils/internal";
7
+ import { createChildLogger, createMultiSinkLogger, } from "@fluidframework/telemetry-utils/internal";
8
8
  import { InsecureTokenProvider } from "@fluidframework/test-runtime-utils/internal";
9
9
  import { default as Axios } from "axios";
10
10
  import { v4 as uuid } from "uuid";
@@ -14,6 +14,12 @@ import { createAzureTokenProvider } from "./AzureTokenFactory.js";
14
14
  * {@link AzureClient} instance based on the mode by setting the Connection config accordingly.
15
15
  */
16
16
  export function createAzureClient(id, name, logger, configProvider, scopes) {
17
+ const args = process.argv.slice(2);
18
+ const driverIndex = args.indexOf("--driver");
19
+ const r11sEndpointNameIndex = args.indexOf("--r11sEndpointName");
20
+ // Get values associated with the flags
21
+ const driver = driverIndex === -1 ? undefined : args[driverIndex + 1];
22
+ const r11sEndpointName = r11sEndpointNameIndex === -1 ? undefined : args[r11sEndpointNameIndex + 1];
17
23
  const useAzure = process.env.FLUID_CLIENT === "azure";
18
24
  const tenantId = useAzure
19
25
  ? process.env.azure__fluid__relay__service__tenantId
@@ -51,9 +57,18 @@ export function createAzureClient(id, name, logger, configProvider, scopes) {
51
57
  }
52
58
  return logger ?? testLogger;
53
59
  };
60
+ const createLogger = createChildLogger({
61
+ logger: getLogger(),
62
+ properties: {
63
+ all: {
64
+ driverType: useAzure ? r11sEndpointName : driver,
65
+ driverEndpointName: driver,
66
+ },
67
+ },
68
+ });
54
69
  return new AzureClient({
55
70
  connection: connectionProps,
56
- logger: getLogger(),
71
+ logger: createLogger,
57
72
  configProvider,
58
73
  });
59
74
  }
@@ -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,EAAc,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAC7F,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,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,OAAO,CAAC;IACtD,MAAM,QAAQ,GAAG,QAAQ;QACxB,CAAC,CAAE,OAAO,CAAC,GAAG,CAAC,sCAAiD;QAChE,CAAC,CAAC,mBAAmB,CAAC;IACvB,MAAM,IAAI,GAAG;QACZ,EAAE,EAAE,EAAE,IAAI,IAAI,EAA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AAM,OAAO,GAAuB;QACnC,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE,cAAc;QACpB,OAAO;QACP,aAAa,EAAE,UAAU;QACzB,gBAAgB,EAAE,UAAU;QAC5B,MAAM,EAAE,MAAM;QACd,GAAG;KACH,CAAC;IAEF,IAAI,CAAC;QACJ,MAAM,QAAQ,GAAkB,MAAM,KAAK,CAAC,OAAO,CAAC,CAAC;QAErD,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YAC7B,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;QAC/C,CAAC;aAAM,CAAC;YACP,MAAM,IAAI,KAAK,CAAC,0CAA0C,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9E,CAAC;QAED,sEAAsE;QACtE,IAAI,QAAQ,EAAE,IAAI,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 { MockLogger, createMultiSinkLogger } 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 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\treturn new AzureClient({\n\t\tconnection: connectionProps,\n\t\tlogger: getLogger(),\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,EA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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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/azure-end-to-end-tests",
3
- "version": "2.10.0",
3
+ "version": "2.11.0",
4
4
  "description": "Azure client end to end tests",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -33,27 +33,28 @@
33
33
  "temp-directory": "nyc/.nyc_output"
34
34
  },
35
35
  "dependencies": {
36
- "@fluid-experimental/data-objects": "~2.10.0",
37
- "@fluid-internal/client-utils": "~2.10.0",
38
- "@fluid-internal/mocha-test-setup": "~2.10.0",
39
- "@fluidframework/aqueduct": "~2.10.0",
40
- "@fluidframework/azure-client": "~2.10.0",
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",
41
42
  "@fluidframework/azure-client-legacy": "npm:@fluidframework/azure-client@^1.2.0",
42
- "@fluidframework/container-definitions": "~2.10.0",
43
- "@fluidframework/container-loader": "~2.10.0",
44
- "@fluidframework/core-interfaces": "~2.10.0",
45
- "@fluidframework/counter": "~2.10.0",
46
- "@fluidframework/datastore-definitions": "~2.10.0",
47
- "@fluidframework/fluid-static": "~2.10.0",
48
- "@fluidframework/map": "~2.10.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",
49
50
  "@fluidframework/map-legacy": "npm:@fluidframework/map@^1.4.0",
50
- "@fluidframework/matrix": "~2.10.0",
51
- "@fluidframework/runtime-definitions": "~2.10.0",
52
- "@fluidframework/sequence": "~2.10.0",
53
- "@fluidframework/telemetry-utils": "~2.10.0",
54
- "@fluidframework/test-runtime-utils": "~2.10.0",
55
- "@fluidframework/test-utils": "~2.10.0",
56
- "@fluidframework/tree": "~2.10.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",
57
58
  "axios": "^1.7.7",
58
59
  "cross-env": "^7.0.3",
59
60
  "mocha": "^10.2.0",
@@ -68,8 +69,8 @@
68
69
  "@biomejs/biome": "~1.9.3",
69
70
  "@fluidframework/build-common": "^2.0.3",
70
71
  "@fluidframework/build-tools": "^0.51.0",
71
- "@fluidframework/driver-definitions": "~2.10.0",
72
- "@fluidframework/eslint-config-fluid": "^5.4.0",
72
+ "@fluidframework/driver-definitions": "~2.11.0",
73
+ "@fluidframework/eslint-config-fluid": "^5.6.0",
73
74
  "@types/mocha": "^9.1.1",
74
75
  "@types/nock": "^9.3.0",
75
76
  "@types/node": "^18.19.0",
@@ -115,11 +116,12 @@
115
116
  "test": "npm run test:realsvc",
116
117
  "test:coverage": "c8 npm test",
117
118
  "test:realsvc": "npm run test:realsvc:tinylicious",
118
- "test:realsvc:azure": "cross-env FLUID_CLIENT=azure npm run test:realsvc:azure:run",
119
+ "test:realsvc:azure": "cross-env FLUID_CLIENT=azure npm run test:realsvc:azure:run -- --driver=r11s --r11sEndpointName=frs",
119
120
  "test:realsvc:azure:run": "mocha --recursive \"lib/test/**/*.spec.*js\" --exit --timeout 20000 --config src/test/.mocharc.cjs",
120
121
  "test:realsvc:run": "mocha lib/test --config src/test/.mocharc.cjs",
121
- "test:realsvc:tinylicious": "start-server-and-test start:tinylicious:test 7071 test:realsvc:azure:run",
122
+ "test:realsvc:tinylicious": "start-server-and-test start:tinylicious:test 7071 test:realsvc:tinylicious:run",
122
123
  "test:realsvc:tinylicious:report": "npm run test:realsvc:tinylicious",
124
+ "test:realsvc:tinylicious:run": "npm run test:realsvc:azure:run -- --driver=t9s",
123
125
  "test:realsvc:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:realsvc"
124
126
  }
125
127
  }
@@ -6,6 +6,7 @@
6
6
  "use strict";
7
7
 
8
8
  const packageDir = `${__dirname}/../..`;
9
- const getFluidTestMochaConfig = require("@fluid-internal/mocha-test-setup/mocharc-common");
9
+ const getFluidTestMochaConfig = require("@fluid-private/test-version-utils/mocharc-common");
10
10
  const config = getFluidTestMochaConfig(packageDir);
11
+
11
12
  module.exports = config;
@@ -17,7 +17,11 @@ import {
17
17
  ITelemetryBaseLogger as ITelemetryBaseLoggerLegacy,
18
18
  } from "@fluidframework/azure-client-legacy";
19
19
  import { IConfigProviderBase } from "@fluidframework/core-interfaces";
20
- import { MockLogger, createMultiSinkLogger } from "@fluidframework/telemetry-utils/internal";
20
+ import {
21
+ MockLogger,
22
+ createChildLogger,
23
+ createMultiSinkLogger,
24
+ } from "@fluidframework/telemetry-utils/internal";
21
25
  import { InsecureTokenProvider } from "@fluidframework/test-runtime-utils/internal";
22
26
  import { default as Axios, AxiosResponse, type AxiosRequestConfig } from "axios";
23
27
  import { v4 as uuid } from "uuid";
@@ -35,6 +39,16 @@ export function createAzureClient(
35
39
  configProvider?: IConfigProviderBase,
36
40
  scopes?: ScopeType[],
37
41
  ): AzureClient {
42
+ const args = process.argv.slice(2);
43
+
44
+ const driverIndex = args.indexOf("--driver");
45
+ const r11sEndpointNameIndex = args.indexOf("--r11sEndpointName");
46
+
47
+ // Get values associated with the flags
48
+ const driver = driverIndex === -1 ? undefined : args[driverIndex + 1];
49
+ const r11sEndpointName =
50
+ r11sEndpointNameIndex === -1 ? undefined : args[r11sEndpointNameIndex + 1];
51
+
38
52
  const useAzure = process.env.FLUID_CLIENT === "azure";
39
53
  const tenantId = useAzure
40
54
  ? (process.env.azure__fluid__relay__service__tenantId as string)
@@ -73,9 +87,19 @@ export function createAzureClient(
73
87
  }
74
88
  return logger ?? testLogger;
75
89
  };
90
+
91
+ const createLogger = createChildLogger({
92
+ logger: getLogger(),
93
+ properties: {
94
+ all: {
95
+ driverType: useAzure ? r11sEndpointName : driver,
96
+ driverEndpointName: driver,
97
+ },
98
+ },
99
+ });
76
100
  return new AzureClient({
77
101
  connection: connectionProps,
78
- logger: getLogger(),
102
+ logger: createLogger,
79
103
  configProvider,
80
104
  });
81
105
  }