chore(repo): enable DB and verbose logging for module federation tests (#28792)
This can help us debug issues that come up during these tests. <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
This commit is contained in:
parent
c08d995290
commit
8e4f9f55b7
@ -2,21 +2,16 @@ import { stripIndents } from '@nx/devkit';
|
|||||||
import {
|
import {
|
||||||
checkFilesExist,
|
checkFilesExist,
|
||||||
cleanupProject,
|
cleanupProject,
|
||||||
fileExists,
|
|
||||||
killPorts,
|
killPorts,
|
||||||
killProcessAndPorts,
|
killProcessAndPorts,
|
||||||
newProject,
|
newProject,
|
||||||
readJson,
|
|
||||||
runCLI,
|
|
||||||
runCLIAsync,
|
runCLIAsync,
|
||||||
runCommandUntil,
|
runCommandUntil,
|
||||||
runE2ETests,
|
runE2ETests,
|
||||||
tmpProjPath,
|
|
||||||
uniq,
|
uniq,
|
||||||
updateFile,
|
updateFile,
|
||||||
updateJson,
|
|
||||||
} from '@nx/e2e/utils';
|
} from '@nx/e2e/utils';
|
||||||
import { readPort } from './utils';
|
import { readPort, runCLI } from './utils';
|
||||||
|
|
||||||
describe('React Rspack Module Federation', () => {
|
describe('React Rspack Module Federation', () => {
|
||||||
describe('Default Configuration', () => {
|
describe('Default Configuration', () => {
|
||||||
|
|||||||
@ -5,14 +5,13 @@ import {
|
|||||||
killPorts,
|
killPorts,
|
||||||
killProcessAndPorts,
|
killProcessAndPorts,
|
||||||
newProject,
|
newProject,
|
||||||
runCLI,
|
|
||||||
runCLIAsync,
|
runCLIAsync,
|
||||||
runCommandUntil,
|
runCommandUntil,
|
||||||
runE2ETests,
|
runE2ETests,
|
||||||
uniq,
|
uniq,
|
||||||
updateFile,
|
updateFile,
|
||||||
} from '@nx/e2e/utils';
|
} from '@nx/e2e/utils';
|
||||||
import { readPort } from './utils';
|
import { readPort, runCLI } from './utils';
|
||||||
|
|
||||||
describe('React Module Federation', () => {
|
describe('React Module Federation', () => {
|
||||||
describe('Default Configuration', () => {
|
describe('Default Configuration', () => {
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import {
|
|||||||
killProcessAndPorts,
|
killProcessAndPorts,
|
||||||
newProject,
|
newProject,
|
||||||
readJson,
|
readJson,
|
||||||
runCLI,
|
|
||||||
runCommandUntil,
|
runCommandUntil,
|
||||||
runE2ETests,
|
runE2ETests,
|
||||||
tmpProjPath,
|
tmpProjPath,
|
||||||
@ -12,7 +11,7 @@ import {
|
|||||||
updateFile,
|
updateFile,
|
||||||
updateJson,
|
updateJson,
|
||||||
} from '@nx/e2e/utils';
|
} from '@nx/e2e/utils';
|
||||||
import { readPort } from './utils';
|
import { readPort, runCLI } from './utils';
|
||||||
|
|
||||||
describe('Dynamic Module Federation', () => {
|
describe('Dynamic Module Federation', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import {
|
|||||||
killProcessAndPorts,
|
killProcessAndPorts,
|
||||||
newProject,
|
newProject,
|
||||||
readJson,
|
readJson,
|
||||||
runCLI,
|
|
||||||
runCommandUntil,
|
runCommandUntil,
|
||||||
runE2ETests,
|
runE2ETests,
|
||||||
tmpProjPath,
|
tmpProjPath,
|
||||||
@ -12,7 +11,7 @@ import {
|
|||||||
updateFile,
|
updateFile,
|
||||||
updateJson,
|
updateJson,
|
||||||
} from '@nx/e2e/utils';
|
} from '@nx/e2e/utils';
|
||||||
import { readPort } from './utils';
|
import { readPort, runCLI } from './utils';
|
||||||
|
|
||||||
describe('Dynamic Module Federation', () => {
|
describe('Dynamic Module Federation', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
|
|||||||
@ -2,13 +2,12 @@ import {
|
|||||||
cleanupProject,
|
cleanupProject,
|
||||||
killProcessAndPorts,
|
killProcessAndPorts,
|
||||||
newProject,
|
newProject,
|
||||||
runCLI,
|
|
||||||
runCommandUntil,
|
runCommandUntil,
|
||||||
runE2ETests,
|
runE2ETests,
|
||||||
uniq,
|
uniq,
|
||||||
updateFile,
|
updateFile,
|
||||||
} from '@nx/e2e/utils';
|
} from '@nx/e2e/utils';
|
||||||
import { readPort } from './utils';
|
import { readPort, runCLI } from './utils';
|
||||||
|
|
||||||
describe('Federate Module', () => {
|
describe('Federate Module', () => {
|
||||||
let proj: string;
|
let proj: string;
|
||||||
|
|||||||
@ -2,13 +2,12 @@ import {
|
|||||||
cleanupProject,
|
cleanupProject,
|
||||||
killProcessAndPorts,
|
killProcessAndPorts,
|
||||||
newProject,
|
newProject,
|
||||||
runCLI,
|
|
||||||
runCommandUntil,
|
runCommandUntil,
|
||||||
runE2ETests,
|
runE2ETests,
|
||||||
uniq,
|
uniq,
|
||||||
updateFile,
|
updateFile,
|
||||||
} from '@nx/e2e/utils';
|
} from '@nx/e2e/utils';
|
||||||
import { readPort } from './utils';
|
import { readPort, runCLI } from './utils';
|
||||||
|
|
||||||
describe('Federate Module', () => {
|
describe('Federate Module', () => {
|
||||||
let proj: string;
|
let proj: string;
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import {
|
|||||||
cleanupProject,
|
cleanupProject,
|
||||||
killProcessAndPorts,
|
killProcessAndPorts,
|
||||||
newProject,
|
newProject,
|
||||||
runCLI,
|
|
||||||
runCommandUntil,
|
runCommandUntil,
|
||||||
runE2ETests,
|
runE2ETests,
|
||||||
uniq,
|
uniq,
|
||||||
@ -10,7 +9,7 @@ import {
|
|||||||
updateJson,
|
updateJson,
|
||||||
} from '@nx/e2e/utils';
|
} from '@nx/e2e/utils';
|
||||||
import { stripIndents } from 'nx/src/utils/strip-indents';
|
import { stripIndents } from 'nx/src/utils/strip-indents';
|
||||||
import { readPort } from './utils';
|
import { readPort, runCLI } from './utils';
|
||||||
|
|
||||||
describe('Independent Deployability', () => {
|
describe('Independent Deployability', () => {
|
||||||
let proj: string;
|
let proj: string;
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import {
|
|||||||
cleanupProject,
|
cleanupProject,
|
||||||
killProcessAndPorts,
|
killProcessAndPorts,
|
||||||
newProject,
|
newProject,
|
||||||
runCLI,
|
|
||||||
runCommandUntil,
|
runCommandUntil,
|
||||||
runE2ETests,
|
runE2ETests,
|
||||||
uniq,
|
uniq,
|
||||||
@ -10,7 +9,7 @@ import {
|
|||||||
updateJson,
|
updateJson,
|
||||||
} from '@nx/e2e/utils';
|
} from '@nx/e2e/utils';
|
||||||
import { stripIndents } from 'nx/src/utils/strip-indents';
|
import { stripIndents } from 'nx/src/utils/strip-indents';
|
||||||
import { readPort } from './utils';
|
import { readPort, runCLI } from './utils';
|
||||||
|
|
||||||
describe('Independent Deployability', () => {
|
describe('Independent Deployability', () => {
|
||||||
let proj: string;
|
let proj: string;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { readJson } from '@nx/e2e/utils';
|
import { readJson, runCLI as _runCLI } from '@nx/e2e/utils';
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
|
|
||||||
export function readPort(appName: string): number {
|
export function readPort(appName: string): number {
|
||||||
@ -10,3 +10,15 @@ export function readPort(appName: string): number {
|
|||||||
}
|
}
|
||||||
return config.targets.serve.options.port;
|
return config.targets.serve.options.port;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Using this function to debug when DB errors occur during MF e2e tests.
|
||||||
|
export function runCLI(cmd: string, opts?: { env?: Record<string, string> }) {
|
||||||
|
return _runCLI(cmd, {
|
||||||
|
verbose: true,
|
||||||
|
env: {
|
||||||
|
...opts?.env,
|
||||||
|
NX_VERBOSE_LOGGING: 'true',
|
||||||
|
NX_NATIVE_LOGGING: 'nx::native::db',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user