Skip to content

Commit

Permalink
log data
Browse files Browse the repository at this point in the history
  • Loading branch information
sonalideshpandemsft committed Oct 31, 2024
1 parent 9127d9f commit bd89d96
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"test:coverage": "c8 npm test",
"test:realsvc": "npm run test:realsvc:tinylicious",
"test:realsvc:azure": "cross-env FLUID_CLIENT=azure npm run test:realsvc:azure:run",
"test:realsvc:azure:run": "mocha --recursive \"lib/test/**/*.spec.*js\" --exit --timeout 20000 --config src/test/.mocharc.cjs",
"test:realsvc:run": "mocha lib/test --config src/test/.mocharc.cjs",
"test:realsvc:tinylicious": "start-server-and-test start:tinylicious:test 7071 test:realsvc:azure:run",
"test:realsvc:azure:run": "mocha --recursive \"lib/test/**/*.spec.*js\" --exit --timeout 20000 --config src/test/.mocharc.cjs -- --driver=frs --driverEndpoint=frs",
"test:realsvc:run": "mocha lib/test --config src/test/.mocharc.cjs -- --driver=frs --driverEndpoint=frs",
"test:realsvc:tinylicious": "start-server-and-test start:tinylicious:test 7071 test:realsvc:azure:run --config ./src/test/.mocharc.cjs -- --driver=t9s",
"test:realsvc:tinylicious:report": "npm run test:realsvc:tinylicious",
"test:realsvc:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:realsvc"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,24 @@
const packageDir = `${__dirname}/../..`;
const getFluidTestMochaConfig = require("@fluid-internal/mocha-test-setup/mocharc-common");
const config = getFluidTestMochaConfig(packageDir);
module.exports = config;

const args = process.argv.slice(2);

function getFluidTestVariant() {
const driverIndex = args.indexOf("--driver");
const endpointIndex = args.indexOf("--driverEndpoint");

const testDriver = driverIndex !== -1 ? args[driverIndex + 1] : "";
const endpointName = endpointIndex !== -1 ? args[endpointIndex + 1] : "";

return `${testDriver}-${endpointName}`;
}

function getFluidTestMocha(packageDir, additionalRequiredModules = []) {
const testVariant = getFluidTestVariant();
process.env.FLUID_TEST_VARIANT = testVariant;

return config(packageDir, additionalRequiredModules, testVariant);
}

module.exports = getFluidTestMocha;
12 changes: 0 additions & 12 deletions packages/service-clients/end-to-end-tests/odsp-client/.mocharc.cjs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"test": "npm run test:realsvc:odsp:run",
"test:coverage": "c8 npm test",
"test:realsvc:odsp": "cross-env npm run test:realsvc:odsp:run",
"test:realsvc:odsp:run": "mocha --recursive \"lib/test/**/*.spec.*js\" --exit --timeout 20000",
"test:realsvc:odsp:run": "mocha --recursive \"lib/test/**/*.spec.*js\" --exit --timeout 20000 --config src/test/.mocharc.cjs -- --driver=odsp --driverEndpoint=odsp",
"test:realsvc:run": "mocha --recursive \"lib/test/**/*.spec.*js\"",
"test:realsvc:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:realsvc"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*!
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*/

"use strict";

const getFluidTestMochaConfig = require("@fluid-internal/mocha-test-setup/mocharc-common");

const packageDir = __dirname;
const config = getFluidTestMochaConfig(packageDir);

const args = process.argv.slice(2);

function getFluidTestVariant() {
const driverIndex = args.indexOf("--driver");
const endpointIndex = args.indexOf("--driverEndpoint");

const testDriver = driverIndex !== -1 ? args[driverIndex + 1] : "";
const endpointName = endpointIndex !== -1 ? args[endpointIndex + 1] : "";

return `${testDriver}-${endpointName}`;
}

function getFluidTestMocha(packageDir, additionalRequiredModules = []) {
const testVariant = getFluidTestVariant();
process.env.FLUID_TEST_VARIANT = testVariant;

return config(packageDir, additionalRequiredModules, testVariant);
}

module.exports = getFluidTestMocha;

0 comments on commit bd89d96

Please sign in to comment.